IBM Support

IJ22942: BRANCH TO NULL WHEN TLS VARIABLE HELPER FUNCTION IS IN LIBRARY WITH RUNTIME LINKING

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • An illegal instruction runtime error is encountered after a
    branch to NULL caused by an invalid branch location loaded for a
    TLS (Thread Local Storage) init function,
    _ZTH#<tls_variable_name>.  This occurs for C11 thread_local TLS
    variables.
    
    The error occurs when calling the function in a shared library
    with runtime linking enabled.  Static linking is unaffected.
    

Local fix

Problem summary

  • PROBLEM DESCRIPTION:
    Runtime fault when entering an extern alias function inside a
    dynamically linked library.  The function descriptor for the
    target function is not populated correctly, for example with a
    function called 'tlsTest':
    
    .csect _ZTH7tlsTest{DS}, 3
    .long 0x00000000
    .long 0x00000000
    .long 0x00000000
    .long 0x00000380
    .long 0x00000000
    .long 0x00000000
    
    
    .toc
    # End csect _ZTH7tlsTest{DS}
    
    The function descriptor should look like:
    
    .csect _ZTH7tlsTest{DS}, 3
    .llong ._ZTH7tlsTest
    .llong TOC{TC0}
    .long 0x00000000
    .long 0x00000000
    # End csect _ZTH7tlsTest{DS}
    
    
    USERS AFFECTED:
    Users of thread_local or function alias attribute
    __attribute__((__alias__('func_name')));
    

Problem conclusion

  • The alias issue was resolved, and the function descriptor is
    populated correctly now.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ22942

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    G10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-02-24

  • Closed date

    2020-04-30

  • Last modified date

    2020-04-30

  • 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++ FOR AI

  • Fixed component ID

    5725C7200

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Document Information

Modified date:
22 August 2024