mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 23:13:34 +00:00
It's now possible to use sigaltstack() to recover from stack overflows on Windows. Several bugs in sigaltstack() have been fixed, for all our supported platforms. There's a newer better example showing how to use this, along with three independent unit tests just to further showcase the various techniques.
19 lines
783 B
C
19 lines
783 B
C
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_NTEXCEPTIONRECORD_H_
|
|
#define COSMOPOLITAN_LIBC_NT_STRUCT_NTEXCEPTIONRECORD_H_
|
|
|
|
#define kNtExceptionMaximumParameters 15
|
|
#define kNtExceptionNoncontinuable 1
|
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
struct NtExceptionRecord {
|
|
uint32_t ExceptionCode; /* kNtException... */
|
|
uint32_t ExceptionFlags; /* kNtExceptionNoncontinuable */
|
|
struct NtExceptionRecord *ExceptionRecord; /* nested exceptions */
|
|
void *ExceptionAddress; /* %rip */
|
|
uint32_t NumberParameters; /* #ExceptionInformation */
|
|
uint64_t ExceptionInformation[kNtExceptionMaximumParameters];
|
|
};
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_NTEXCEPTIONRECORD_H_ */
|