Skip to content

[msan] Reland: Increase k num stack origin descrs (limited to non-PowerPC) #93117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion compiler-rt/lib/msan/msan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ int msan_report_count = 0;

// Array of stack origins.
// FIXME: make it resizable.
static const uptr kNumStackOriginDescrs = 1024 * 1024;
// Although BSS memory doesn't cost anything until used, it is limited to 2GB
// in some configurations (e.g., "relocation R_X86_64_PC32 out of range:
// ... is not in [-2147483648, 2147483647]; references section '.bss'").
// We use kNumStackOriginDescrs * (sizeof(char*) + sizeof(uptr)) == 64MB.
#ifdef SANITIZER_PPC
// soft_rss_limit test (release_origin.c) fails on PPC if kNumStackOriginDescrs
// is too high
static const uptr kNumStackOriginDescrs = 1 * 1024 * 1024;
#else
static const uptr kNumStackOriginDescrs = 4 * 1024 * 1024;
#endif // SANITIZER_PPC
static const char *StackOriginDescr[kNumStackOriginDescrs];
static uptr StackOriginPC[kNumStackOriginDescrs];
static atomic_uint32_t NumStackOriginDescrs;
Expand Down
Loading