File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
system/lib/compiler-rt/lib/asan Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2188,8 +2188,8 @@ def check_memory_setting(setting):
2188
2188
# Increase the minimum memory requirements to account for extra memory
2189
2189
# that the sanitizers might need (in addition to the shadow memory
2190
2190
# requirements handled below).
2191
- # These values are designed be over-estimate the actual requirements and
2192
- # based on experimentation with different tests/programs under asan and
2191
+ # These values are designed be an over-estimate of the actual requirements and
2192
+ # are based on experimentation with different tests/programs under asan and
2193
2193
# lsan.
2194
2194
settings .INITIAL_MEMORY += 50 * 1024 * 1024
2195
2195
if settings .USE_PTHREADS :
@@ -2270,7 +2270,7 @@ def check_memory_setting(setting):
2270
2270
2271
2271
# We start our global data after the shadow memory.
2272
2272
# We don't need to worry about alignment here. wasm-ld will take care of that.
2273
- settings .GLOBAL_BASE = shadow_size + 1
2273
+ settings .GLOBAL_BASE = shadow_size
2274
2274
2275
2275
if not settings .ALLOW_MEMORY_GROWTH :
2276
2276
settings .INITIAL_MEMORY = total_mem
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ void InitializeShadowMemory() {
24
24
// Assert that the shadow region is large enough. We don't want to start
25
25
// running into the static data region which starts right after the shadow
26
26
// region.
27
- uptr max_address = __builtin_wasm_memory_size (0 ) * WASM_PAGE_SIZE;
27
+ uptr max_address = ( __builtin_wasm_memory_size (0 ) * WASM_PAGE_SIZE) - 1 ;
28
28
uptr max_shadow_address = MEM_TO_SHADOW (max_address);
29
29
// TODO(sbc): In the growable memory case we should really be checking this
30
30
// every time we grow.
You can’t perform that action at this time.
0 commit comments