IBM Support

IV85869: NAME DEMANGLING CHANGE CAUSING INCOMPATIBLE SYMBOL NAMES BETWEEN PTFS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A C++ name mangling change to function names in unnamed
    namespaces was made in the XL C/C++ for AIX, V11.1.0.13 PTF
    (February 2013) and XL C/C++ for AIX, V12.1.0.3 PTF (March
    2013).  The V11.1 APAR was IV24703, and the V12.1 APAR was
    IV37942.
    
    This change introduced a backwards compatibility issue with code
    compiled before/after the fix.  Linking objects compiled with
    the compiler before the fix with objects compiled after the fix
    might result in undefined symbol linker errors for similar
    function names in unnamed namespaces.
    
    This APAR is to revert the name mangling behaviour change in
    IV24703 and IV37942 to allow the older behaviour to act as
    default.  The newer IV24703 and IV37942 behaviour will now be
    enabled by a -qxflag option, and will be required by users
    impacted by the constructor/destructor issue as described in
    IV24703 and IV37942.
    
    The newer IV24703 and IV37942 behaviour is enabled by default in
    the V13.1 and up compilers.  Older name mangling behaviour can
    be set with the -qnamemangling option.
    
    
    
       === TEST CASE ===
    
    For objects compiled with
        V11.1.0.0 - V11.1.0.12 / V12.1.0.0 -V12.1.0.2:
    
    $ cat test.cpp
    namespace {
        int testfunc() { return 5; }
    }
    $ xlC -c test.cpp
    $ nm -C test.o | grep testfunc
    .testfunc__10test.cpp-0Fv T         320
    testfunc__10test.cpp-0Fv D         952          12
    testfunc__10test.cpp-0Fv d         916           4
    $
    
    For objects compiled with
        V11.1.0.13 - V11.1.0.23 / V12.1.0.3 - V12.1.0.15:
    
    $ xlC -c test.cpp
    bash-4.2$ nm test.o | grep testfunc
    .testfunc__8test_cppFv T         320
    testfunc__8test_cppFv D         952          12
    testfunc__8test_cppFv d         916           4
    $
    

Local fix

  • None.  Use older PTF level to generate older name mangling
    behaviour.
    

Problem summary

  • PROBLEM DESCRIPTION:
    The problem is with inconsistent mangling of
    constructor/destructor names for classes in an unnamed
    namespace between PTF releases.
    
    USERS AFFECTED:
    The problem may affect users of a class in an unnamed namespace
    requiring binary compatibility with an older compiler.
    

Problem conclusion

  • The original V11.1/V12.1 name mangling has been restored and
    the updated mangling is protected under a special flag:
    -qxflag=UnnamedNamespaceNM
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV85869

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-06-21

  • Closed date

    2016-06-21

  • Last modified date

    2016-06-21

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

    IV82949

  • 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

  • RC10 PSY

       UP

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1"}]

Document Information

Modified date:
13 September 2021