Skip to content

Commit

Permalink
Reduce ASAN native stack check gap
Browse files Browse the repository at this point in the history
Summary:
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: D67346000

fbshipit-source-id: 0c5529eb427c6c6d2a11d1f9accec86c02ff09b0
  • Loading branch information
avp authored and facebook-github-bot committed Dec 18, 2024
1 parent 4903f95 commit be237c7
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 @@ -1695,7 +1695,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 @@ -86,7 +86,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 be237c7

Please sign in to comment.