Skip to content

Commit

Permalink
Reduce ASAN native stack check gap
Browse files Browse the repository at this point in the history
Summary:
Original Author: avp@meta.com
Original Git: be237c7
Original Reviewed By: tmikov
Original Revision: D67346000

This was causing RangeErrors to be reported too early in ASAN,
and reducing it by half doesn't appear to cause crashes in any tests.

Reviewed By: tmikov

Differential Revision: D67410290

fbshipit-source-id: 27c8f2f8e4e1181385874eb3c0a99790586f6d82
  • Loading branch information
avp authored and facebook-github-bot committed Dec 19, 2024
1 parent 817a35b commit e28fd47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/hermes/VM/Runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ class ScopedNativeDepthReducer {
// This is empirically good enough.
static constexpr int kReducedNativeStackGap =
#if LLVM_ADDRESS_SANITIZER_BUILD
256 * 1024;
128 * 1024;
#else
32 * 1024;
#endif
Expand Down
2 changes: 1 addition & 1 deletion lib/VM/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static constexpr uint32_t kMaxSupportedNumRegisters =
/// The minimum stack gap allowed from RuntimeConfig.
static constexpr uint32_t kMinSupportedNativeStackGap =
#if LLVM_ADDRESS_SANITIZER_BUILD
512 * 1024;
256 * 1024;
#else
64 * 1024;
#endif
Expand Down

0 comments on commit e28fd47

Please sign in to comment.