mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 18:58:30 +00:00
Restore MODE=dbg support
We recently broke MODE=dbg support when we added C++ exception support. This change adds the missing UBSAN interfaces, needed to get it working again. Some of the ASAN checking in the SJLJ guts needed to be disabled since I doubt anyone's combined the two features until now.
This commit is contained in:
parent
f27808c4d2
commit
c1e18e7903
5 changed files with 34 additions and 38 deletions
7
third_party/libunwind/README.cosmo
vendored
7
third_party/libunwind/README.cosmo
vendored
|
@ -12,5 +12,8 @@ ORIGIN
|
|||
Date: Tue, 28 Nov 2023 09:52:28 +0100
|
||||
|
||||
LOCAL CHANGES
|
||||
- Fixed `_Unwind_FunctionContext` struct to be ABI-compatible with code
|
||||
generated by GCC.
|
||||
|
||||
- Fixed `_Unwind_FunctionContext` struct to be ABI-compatible with
|
||||
code generated by GCC.
|
||||
|
||||
- Added `dontasan` annotations to functions that raised ASAN errors.
|
||||
|
|
5
third_party/libunwind/Unwind-sjlj.c
vendored
5
third_party/libunwind/Unwind-sjlj.c
vendored
|
@ -105,7 +105,7 @@ __Unwind_SjLj_SetTopOfFunctionStack(struct _Unwind_FunctionContext *fc) {
|
|||
|
||||
|
||||
/// Called at start of each function that catches exceptions
|
||||
_LIBUNWIND_EXPORT void
|
||||
_LIBUNWIND_EXPORT void dontasan
|
||||
_Unwind_SjLj_Register(struct _Unwind_FunctionContext *fc) {
|
||||
fc->prev = __Unwind_SjLj_GetTopOfFunctionStack();
|
||||
__Unwind_SjLj_SetTopOfFunctionStack(fc);
|
||||
|
@ -113,7 +113,7 @@ _Unwind_SjLj_Register(struct _Unwind_FunctionContext *fc) {
|
|||
|
||||
|
||||
/// Called at end of each function that catches exceptions
|
||||
_LIBUNWIND_EXPORT void
|
||||
_LIBUNWIND_EXPORT void dontasan
|
||||
_Unwind_SjLj_Unregister(struct _Unwind_FunctionContext *fc) {
|
||||
__Unwind_SjLj_SetTopOfFunctionStack(fc->prev);
|
||||
}
|
||||
|
@ -426,6 +426,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetGR(struct _Unwind_Context *context,
|
|||
|
||||
|
||||
/// Called by personality handler during phase 2 to alter register values.
|
||||
dontasan
|
||||
_LIBUNWIND_EXPORT void _Unwind_SetGR(struct _Unwind_Context *context, int index,
|
||||
uintptr_t new_value) {
|
||||
_LIBUNWIND_TRACE_API("_Unwind_SetGR(context=%p, reg=%d, value=0x%" PRIuPTR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue