IBM Support

LI80715: CRASH IN PTHREAD_EXIT STACK UNWINDING WHEN COMPILED WITH -FSTACK-PROTECTOR-STRONG

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • After a call to pthread_exit in an application compiled with the
    stack protect -fstack-protector-strong option, the program
    encounters a segmentation fault during the thread stack frame
    unwinding process.  The GDB stack trace may look similar to:
    
    #0  0x00003fffb7d3b4cc in ?? () from
                /lib/powerpc64le-linux-gnu/libgcc_s.so.1
    
    #1  0x00003fffb7d3b968 in ?? () from
                /lib/powerpc64le-linux-gnu/libgcc_s.so.1
    
    #2  0x00003fffb7d3bce0 in ?? () from
                /lib/powerpc64le-linux-gnu/libgcc_s.so.1
    
    #3  0x00003fffb7d3c378 in _Unwind_ForcedUnwind () from
                /lib/powerpc64le-linux-gnu/libgcc_s.so.1
    
    #4  0x00003fffb7f4762c in _Unwind_ForcedUnwind (exc=<optimized
                out>, stop=<optimized out>, stop_argument=<optimized
                out>) at ../sysdeps/nptl/unwind-forcedunwind.c:134
    
    #5  0x00003fffb7f443ec in __GI___pthread_unwind (buf=<optimized
                out>) at unwind.c:121
    
    #6  0x00003fffb7f39424 in __do_cancel () at pthreadP.h:283
    
    #7  __pthread_exit (value=<optimized out>) at pthread_exit.c:28
    

Local fix

  • Do no use -fstack-protector-strong
    

Problem summary

  • PROBLEM DESCRIPTION:
    The ehframe saved on the stack was corrupted by the store of
    the stack guard canary value.  When unwinding happens, a crash
    occurs.
    
    USERS AFFECTED:
    Users of -fstack-protector-strong and pthreads.
    

Problem conclusion

  • The store of the canary word was corrected and the generated
    frame is now safe for unwinding.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI80715

  • Reported component name

    XL C/C++ LINUX

  • Reported component ID

    5725C7310

  • Reported release

    G11

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-04-16

  • Closed date

    2019-06-21

  • Last modified date

    2019-06-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ LINUX

  • Fixed component ID

    5725C7310

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"G11","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
21 June 2019