Operating System - HP-UX
1753847 Members
8329 Online
108807 Solutions
New Discussion юеВ

signal 11 when linking c++ binary

 

signal 11 when linking c++ binary

when linking a C++ binary, getting the following error:

ucomp :
Error : Unexpected signal 11 received. See signal(2) or contact HP if you did not intentionally send this signal. (6987)

any ideas or how to resolve this ?
doing the build on HP 11.11 system.

Thanks
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor

Re: signal 11 when linking c++ binary

Signal 11 (SIGSEGV) is a segmentation violation. It could be a bug in the linker ld OR you may simply need to increase maxdsiz and/or maxssiz. Increase maxssiz to something around 64MB (and that is generous) and maxdsiz to somewhere between 256MB and 1GB. I would also look for and install and ld/as/cc related patches.
If it ain't broke, I can fix that.

Re: signal 11 when linking c++ binary


I have the following values set.
maxdsiz 0xb0000000 - 0XB0000000
maxdsiz_64bit 0x400000000 - 0X400000000
maxssiz 0x8000000 - 0X8000000
maxssiz_64bit 0x10000000 - 0X10000000

any specific ld patch to be checked ?
I will also search to see any patch related to this.

Thanks
Ermin Borovac
Honored Contributor

Re: signal 11 when linking c++ binary

Please check the version of Auxiliary-Opt.LANG-AUX fileset

# swlist -l fileset | grep Auxiliary-Opt.LANG-AUX

If the version is 11.11.06 install the following patches.

Patch Name: PHSS_28594
Patch Description: s700_800 11.X +O4/PBO Compiler B.11.11.06 cumulative patch

Patch Name: PHSS_28706
Patch Description: s700_800 11.X ANSI C compiler B.11.11.06 cumulative patch

From patch notes

JAGae35670 : AR0902 ucomp generates error in ld -r phase (6987)


Re: signal 11 when linking c++ binary


I have 11.11.08 version.

$ swlist -l fileset | grep Auxiliary-Opt.LANG-AUX
Auxiliary-Opt.LANG-AUX B.11.11.08 Advanced Optimization Tools

June 2003 bundle is installed.
can I still apply these patches
are there patches on top of 11.11.08 ?
Ermin Borovac
Honored Contributor

Re: signal 11 when linking c++ binary

Patches for version B.11.11.08 are

PHSS_29484
PHSS_29485

I can't see any notes in these patches specific to your problem; install them anyway.

Also it's a good idea to install latest linker patch.

PHSS_30970
A. Clay Stephenson
Acclaimed Contributor

Re: signal 11 when linking c++ binary

By all means apply any compiler/linker patches. If the problem persists, I would try compiling by turning off all optimization. I've occasionally seen the optimizer produce unstable code.

This is one of those problems that should be reported to HP.
If it ain't broke, I can fix that.

Re: signal 11 when linking c++ binary


I could link it by turning off the optimization. Thanks.

But when executing it, getting the following error:
aCC runtime: Error 22 from shl_findsym(/usr/lib/libCsup_v2.2,_shlInit)
Abort(coredump)

A. Clay Stephenson
Acclaimed Contributor

Re: signal 11 when linking c++ binary

I doubt this has anything to do with your linker problems. It's now time to compile everything with the -g flag, don't strip the code; execute it and let it dump core. You then use gdb to examine a stack trace.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: signal 11 when linking c++ binary

It's also a good idea to do a man shl_findsym and see what conditions can set errno = EINVAL (22). This is debugging 101.
If it ain't broke, I can fix that.