https://bugs.llvm.org/show_bug.cgi?id=41397
Bug ID: 41397
Summary: __cxa_exception doesn't match Itanium spec.
Product: libc++abi
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Created attachment 21739
--> https://bugs.llvm.org/attachment.cgi?id=21739&action=edit
libstdcxx_test.cpp
To support C++11 exception point, we added a ref count member at the start of
the `__cxa_exception` type. However, `__cxa_exception` is specified by the
Itanium spec and in the specification it doesn't contain the new member.
Since `__cxa_exception` is part of the ABI specification, users may declare
their own copy of it and then attempt to access in-flight exceptions using
`__cxa_get_globals()`.
When this occurs the members of the `__cxa_exception` objects are at the wrong
offsets and this can break users.
GCC's fixs to this problem was to keep `__cxa_exception`'s layout and put the
refcount in a new type `__cxa_refcounted_exception` [1]. We should consider
doing similar.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38732
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs