[Bug libstdc++/70966] New: new_delete_resource() has deinit lifetime issues.

eric at efcs dot ca gcc-bugzilla@gcc.gnu.org
Thu May 5 21:35:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70966

            Bug ID: 70966
           Summary: new_delete_resource() has deinit lifetime issues.
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

Created attachment 38422
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38422&action=edit
example.cpp

The value returned from 'new_delete_resource()' should be usable at all stages
of program startup and termination.

In the current implementation the static deinitialization order fiasco can
occur when a static object 'obj' is constructed before the first call to
'new_delete_resource()' and 'obj' references 'new_delete_resource()' in its
destructor.


More information about the Gcc-bugs mailing list