forked from OSchip/llvm-project
[NFC][sanitizer] Limit StackStore stack size/tag to 1 byte
Nothing uses more than 8bit now. So the rest of the headers can store other data. kStackTraceMax is 256 now, but all sanitizers by default store just 20-30 frames here.
This commit is contained in:
parent
402a406323
commit
6889592ebc
|
@ -16,13 +16,13 @@ namespace __sanitizer {
|
|||
|
||||
namespace {
|
||||
struct StackTraceHeader {
|
||||
static constexpr u32 kStackSizeBits = 16;
|
||||
static constexpr u32 kStackSizeBits = 8;
|
||||
|
||||
u32 size;
|
||||
u32 tag;
|
||||
u8 size;
|
||||
u8 tag;
|
||||
explicit StackTraceHeader(const StackTrace &trace)
|
||||
: size(trace.size), tag(trace.tag) {
|
||||
CHECK_LT(trace.size, 1 << kStackSizeBits);
|
||||
: size(Min<uptr>(trace.size, (1u << 8) - 1)), tag(trace.tag) {
|
||||
CHECK_EQ(trace.tag, static_cast<uptr>(tag));
|
||||
}
|
||||
explicit StackTraceHeader(uptr h)
|
||||
: size(h & ((1 << kStackSizeBits) - 1)), tag(h >> kStackSizeBits) {}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace __sanitizer {
|
|||
|
||||
struct BufferedStackTrace;
|
||||
|
||||
static const u32 kStackTraceMax = 256;
|
||||
static const u32 kStackTraceMax = 255;
|
||||
|
||||
#if SANITIZER_LINUX && defined(__mips__)
|
||||
# define SANITIZER_CAN_FAST_UNWIND 0
|
||||
|
|
Loading…
Reference in New Issue