View topic - Stale pointer relase from free() call of libc.so.3
Stale pointer relase from free() call of libc.so.3
3 posts
• Page 1 of 1
Stale pointer relase from free() call of libc.so.3
Hi,
>>>Am releasing same heap twice.
For e.g.
char *pData=new char[20];
delete[] pData;
delete[] pData;
>>>>When above code is run, gives below stack
[Call stack]
#0 0x01026384 in _list_release () from C:\QNX650SP1_Pltf\target\qnx6\armle-v7\lib\libc.so.3
#1 0x01027fd4 in __free () from C:\QNX650SP1_Pltf\target\qnx6\armle-v7\lib\libc.so.3
+++++++++++++++++++++++++++++++++++++++++++++++++++
however if i keep few secs gap between two delete, following stack is generated.
See the following stack address, they are different.
Does this mean, in the few secs gap, this release HEAP is assigned to some other process and now when we are releasing the stale pointer, it comes up with the below stack address.
#0 0x010278a8 in __flist_dequeue_bin () from libc.so.3
#1 0x010264b8 in _list_release () from libc.so.3
#2 0x01027fd4 in __free () from libc.so.3
>>>Am releasing same heap twice.
For e.g.
char *pData=new char[20];
delete[] pData;
delete[] pData;
>>>>When above code is run, gives below stack
[Call stack]
#0 0x01026384 in _list_release () from C:\QNX650SP1_Pltf\target\qnx6\armle-v7\lib\libc.so.3
#1 0x01027fd4 in __free () from C:\QNX650SP1_Pltf\target\qnx6\armle-v7\lib\libc.so.3
+++++++++++++++++++++++++++++++++++++++++++++++++++
however if i keep few secs gap between two delete, following stack is generated.
See the following stack address, they are different.
Does this mean, in the few secs gap, this release HEAP is assigned to some other process and now when we are releasing the stale pointer, it comes up with the below stack address.
#0 0x010278a8 in __flist_dequeue_bin () from libc.so.3
#1 0x010264b8 in _list_release () from libc.so.3
#2 0x01027fd4 in __free () from libc.so.3
- abhayarya2000
- New Member
- Posts: 4
- Joined: Fri Jul 01, 2016 11:52 pm
Re: Stale pointer relase from free() call of libc.so.3
I'm not quite sure why you are interested in or concerned about the failure of bad code.
That said the answer to your question is no. Processes in QNX do not run in the same address space.
That said the answer to your question is no. Processes in QNX do not run in the same address space.
- maschoen
- QNX Master
- Posts: 2715
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Stale pointer relase from free() call of libc.so.3
Thanks maschoen
- abhayarya2000
- New Member
- Posts: 4
- Joined: Fri Jul 01, 2016 11:52 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest