Operating System - Linux
1753396 Members
7021 Online
108792 Solutions
New Discussion юеВ

Re: HPUX 11.23 PARISC, QPK1123 generating SIGFPE

 
sadat
Advisor

HPUX 11.23 PARISC, QPK1123 generating SIGFPE

Hi,

If I link the any c code with -lsec (though i may not be using any of -lsec functions), it generates SIGFPE, if the QPK1123 depot is installed.


3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: HPUX 11.23 PARISC, QPK1123 generating SIGFPE

It might be helpful to use a debugger to get a stack trace of that divide by 0.
sadat
Advisor

Re: HPUX 11.23 PARISC, QPK1123 generating SIGFPE

I`am not doing any division in the code. If i remove the lsec file and compile the code it works fine. This started happening after i installed the QPK11.23 on this m/c. Following is the bt

#0 0xc3a3a874 in regular_seq () from /usr/lib/libc.2
(gdb) bt
#0 0xc3a3a874 in regular_seq () from /usr/lib/libc.2
#1 0xc3b2a2cc in pthread_key_delete () from /usr/lib/libc.2
#2 0xc0065c38 in __libsec_getspent_fini () from /usr/lib/libsec.2
#3 0xc00661f8 in __libsec_fini () from /usr/lib/libsec.2
#4 0xc00395b0 in shl_invoke_initfini () from /usr/lib/dld.sl
#5 0xc0039048 in shl_implicit_invoke_fini () from /usr/lib/dld.sl
#6 0xc3ac342c in exit () from /usr/lib/libc.2
#7 0x00002b1c in main () at test.c:27
Dennis Handly
Acclaimed Contributor

Re: HPUX 11.23 PARISC, QPK1123 generating SIGFPE

Do you have libsec PHCO_37069 installed?

>I`am not doing any division in the code.

But libc is. Are you linking with -lpthread?

#0 0xc3a3a874 regular_seq libc.2
#1 0xc3b2a2cc pthread_key_delete libc.2
#2 0xc0065c38 __libsec_getspent_fini libsec.2
#3 0xc00661f8 __libsec_fini libsec.2
#4 0xc00395b0 shl_invoke_initfini dld.sl
#5 0xc0039048 shl_implicit_invoke_fini dld.sl
#6 0xc3ac342c exit libc.2
#7 0x00002b1c main test.c:27

The problem occurs if pthread_key_delete is called without calling pthread_key_create. I suppose this is a user error.

But the real problem is in libsec where it calls pthread_key_delete at exit time, even if it never created one.

I'm not sure how this can fail unless you are fiddling with __ismt??