Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interesting AIX SEGV....

Status
Not open for further replies.

radhanitt

Programmer
Joined
May 5, 2007
Messages
5
Location
US
Hello all,

One of the application we port to Aix from linux Segmentation faults when it exits. Here is part of backtrace of SEGV:
(dbx) where
splay(??, ??, ??) at
free_y(??, ??) at
free_common(??) at
....
exit(??) at
...

Application seem to perform everything expected well and while exiting it SEGV. By doing lot of googling learnt this could be due to heap corruption.

Tried the following:
1. setenv MALLOCDEBUG verbose

Result:
Malloc Report: The address passed to free, <x>, is
outside the valid range of addresses allocated by malloc (errno = 2).

2. setenv MALLOCTYPE debug
Run the application no SEGV at all. It exits normally.

3. setenv MALLOCTYPE watson
setenv MALLOCDEBUG catch_overflow

Run the application no SEGV at all. It exits normally.

Tried running same application same way with valgrind, totalview, MEMORY_CHECK_2 in linux to find potential coding error but found none.

Queries:
1. How can I find what is happening in memory address "x"? Who changes/disturbs it? Tried setting a watchpoint for that location but the error was:
Unreadable instruction at address 0x10000000
What else can i do? How can I find what happens in this location?

2. What difference does malloctype debug/watson does compared to default(yoktown)? Why isn't there a SEGV at that time?

3. Is there any tool to watch/examine heap?

4. Is there any other tool/option which could be used to debug this problem further?

Any pointers/suggestions/help is most welcome

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top