New AIX libstdc++ testsuite regression 20_util/allocator_members

David Edelsohn
Mon Apr 22 13:47:00 GMT 2002

	As soon as I saw that the testcase overrides operator new and
operator delete, I had a guess about what was wrong and my manual
workaround allows the testcase to succeed.  What I do not understand is
what has changed that caused this testcase to work before and not work

	The problem is the testcase wants to override new and delete which
causes problems with AIX-style binding and explicit exports.  libstdc++ is
built with the AIX -Wl,-G "runtime-linking" option so that methods can be
dynamically overridden if the application is linked with the AIX -Wl,-brtl
option.  The problem is that one needs to explicitly export the
replacement functions from the main program.

	If I explicitly export _Znwm and _ZdlPv when linking the testcase,
it works correctly.  BTW, this is the same problem which causes the C++
torture cxa_vec.C and new3.C testcases to fail.

	I do not know exactly why this testcase worked before, most likely
the stl_alloc.h.  It is as if G++ somehow were short-circuiting the call
before (maybe inlining?) and directly using the definitions of new and
delete in the main program.  For whatever reason, G++ now is trying to
obtain new and delete externally and the override fails without more AIX

	I do not know how to get back to the old behavior.

Sigh, David

More information about the Libstdc++ mailing list