Aix xlc interesting SEGV on exit


 
Thread Tools Search this Thread
Operating Systems AIX Aix xlc interesting SEGV on exit
# 1  
Old 03-03-2009
Data Aix xlc interesting SEGV on exit

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.
# 2  
Old 03-04-2009
While i can't help you directly with your problem (stopped programming way too long ago and never did it under AIX) here are some general pointers which might help you:

Try the AIX programmers reference offered at the Max Planck Institute for Solid State Research, Stuttgart:

AIX Documentation: Programmer's Reference

It is for AIX 5.2, which might not be the release you are using, but maybe the problem is not version-dependent.

You may know the standard debugger "dbx", but you might not know the kernel debugger "kdb". Beware, though! This is a quite dangerous tool, you could easily crash the machine.

Lastly, we have a special forum for High-Level Programming in Unix environments. You might want to pass this thread over to there. Give me (any mod) a short note if you want to do this.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX xlc compiler vs gcc

Hello, We are migrating some applications from previously running on an AIX system to a Linux RedHat system. I was tasked with recompiling some of the code. Unfortunatly I am a big novice on this. So i have the commands used to compile the code with xlc compiler in the AIX environment and i am... (0 Replies)
Discussion started by: spooksman
0 Replies

2. Red Hat

Help needed 'Segv'

Red Hat Enterprise 4.5 (32 bit) In strace we see "unexpected reloc type 0x38" What does that code 0x38 mean? mprotect(0x59a000, 42229760, PROT_READ|PROT_WRITE) = 0 writev(2, unexpected reloc type 0x38", 26}, {"", 0}, {"", 0}, {"\n", 1}], 1 0) = 113 exit_group(127) ... (6 Replies)
Discussion started by: Sunusernewbie
6 Replies

3. UNIX for Advanced & Expert Users

XLC compiler: enterprise edition VS XLC for AIX

Who can explain in a few words the difference between XLC for AIX and XLC enterprise Edition for AIX (0 Replies)
Discussion started by: fvaltat1
0 Replies

4. AIX

xlc question on AIX

Problem when compiling c-source with xlc it will generate some other files .lst .call. This kind of files is generated on the current directory. Question Can I influence the directory where the .lst and .call is generated. What i want is a dir stucture like this: project |---c-source... (0 Replies)
Discussion started by: corley
0 Replies

5. UNIX for Dummies Questions & Answers

Help with HUP and SEGV.

Hello - I need to know the detail of HUP and SEGV. I know HUP is Hangup and can be use to kill a Unix login session remotely by sending a hangup signal to the process running the login session. Could someone tell me in detail prupose of HUP and SEGV (segmentation violation)? I need to... (1 Reply)
Discussion started by: namasteall2000
1 Replies

6. AIX

AIX Xlc compiler

Hi Team I have a native applicaiton built on AIX using the xLC v8 Which could be the possible impacts from a code change point of view if I'll compile with the xLC v10? Thanks Marco (0 Replies)
Discussion started by: antcos
0 Replies

7. Programming

Interesting issue with pthread_mutex_lock and siglongjmp in AIX 5.3 (and no other OS)

Executive summary: Code (posted below) cores in AIX 5.3, despite being compiled and run successfully on several other operating systems. Code is attempting to verify that pthread_mutex_lock can be successfully aborted by siglongjmp. I do not believe this is an unreasonable requirement. If... (1 Reply)
Discussion started by: DreamWarrior
1 Replies

8. AIX

Need help installing 'xlc' on AIX

Hello, I'm getting "xlc: not found" error compiling code using 'make oracle' command on IBM AIX. C/C++ compiler is installed, but 'xlc' still missing. Could you please tell me which OS package contains the 'xlc' executable? $ > make oracle xlc -qmkshrobj -e MQStart -L/usr/mqm/lib -lmqmcs_r... (4 Replies)
Discussion started by: safir29
4 Replies

9. AIX

aix xlc

Hi guys, I need to compile sap libraries, installed make, automake, gcc, libstc libgcc and everything I used to install on linux when compiling when i run make, it aborts with the error msg /usr/bin/sh: xlc: not found. I see the binary xlc is missing lslpp -l | grep -i xlc ... (3 Replies)
Discussion started by: funksen
3 Replies

10. Programming

AIX- xlc and cc

when i compile with Xlc i sometimes get the following Error: (S) Initialization between types "int" and "struct MskTtimerData*" is not allowed. when i compile with cc with the same Flags, i only get a (W) with the same message, but it compiles fine. How can i get the Xlc to 'ignore' the... (3 Replies)
Discussion started by: Lazzar
3 Replies
Login or Register to Ask a Question