Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150074383
D28799.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D28799.diff
View Options
diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc
--- a/contrib/libcxxrt/exception.cc
+++ b/contrib/libcxxrt/exception.cc
@@ -572,19 +572,6 @@
}
}
-#ifdef __LP64__
-/**
- * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte
- * alignment but it was broken by the addition of the referenceCount.
- * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep
- * compatibility with consumers of the broken __cxa_exception, explicitly add
- * padding on allocation (and account for it on free).
- */
-static const int exception_alignment_padding = 8;
-#else
-static const int exception_alignment_padding = 0;
-#endif
-
/**
* Allocates an exception structure. Returns a pointer to the space that can
* be used to store an object of thrown_size bytes. This function will use an
@@ -593,19 +580,16 @@
*/
extern "C" void *__cxa_allocate_exception(size_t thrown_size)
{
- size_t size = exception_alignment_padding + sizeof(__cxa_exception) +
- thrown_size;
+ size_t size = thrown_size + sizeof(__cxa_exception);
char *buffer = alloc_or_die(size);
- return buffer + exception_alignment_padding + sizeof(__cxa_exception);
+ return buffer+sizeof(__cxa_exception);
}
extern "C" void *__cxa_allocate_dependent_exception(void)
{
- size_t size = exception_alignment_padding +
- sizeof(__cxa_dependent_exception);
+ size_t size = sizeof(__cxa_dependent_exception);
char *buffer = alloc_or_die(size);
- return buffer + exception_alignment_padding +
- sizeof(__cxa_dependent_exception);
+ return buffer+sizeof(__cxa_dependent_exception);
}
/**
@@ -633,8 +617,7 @@
}
}
- free_exception(reinterpret_cast<char*>(ex) -
- exception_alignment_padding);
+ free_exception(reinterpret_cast<char*>(ex));
}
static void releaseException(__cxa_exception *exception)
@@ -661,8 +644,7 @@
{
releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex)));
}
- free_exception(reinterpret_cast<char*>(ex) -
- exception_alignment_padding);
+ free_exception(reinterpret_cast<char*>(ex));
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 4:31 AM (10 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30561748
Default Alt Text
D28799.diff (2 KB)
Attached To
Mode
D28799: Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way
Attached
Detach File
Event Timeline
Log In to Comment