You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/runtime_safe_heap.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ function SAFE_HEAP_STORE(dest, value, bytes, isFloat) {
110
110
#else
111
111
if(dest%bytes!==0)warnOnce('alignment error in a memory store operation, alignment was a multiple of '+(((dest^(dest-1))>>1)+1)+', but was was expected to be aligned to a multiple of '+bytes);
112
112
#endif
113
-
if(runtimeInitialized){
113
+
if(runtimeInitialized&&!runtimeExited){
114
114
varbrk=_sbrk()>>>0;
115
115
if(dest+bytes>brk)abort('segmentation fault, exceeded the top of the available dynamic heap when storing '+bytes+' bytes to address '+dest+'. DYNAMICTOP='+brk);
116
116
assert(brk>=_emscripten_stack_get_base());// sbrk-managed memory must be above the stack
@@ -134,7 +134,7 @@ function SAFE_HEAP_LOAD(dest, bytes, unsigned, isFloat) {
134
134
#else
135
135
if(dest%bytes!==0)warnOnce('alignment error in a memory load operation, alignment was a multiple of '+(((dest^(dest-1))>>1)+1)+', but was was expected to be aligned to a multiple of '+bytes);
136
136
#endif
137
-
if(runtimeInitialized){
137
+
if(runtimeInitialized&&!runtimeExited){
138
138
varbrk=_sbrk()>>>0;
139
139
if(dest+bytes>brk)abort('segmentation fault, exceeded the top of the available dynamic heap when loading '+bytes+' bytes from address '+dest+'. DYNAMICTOP='+brk);
140
140
assert(brk>=_emscripten_stack_get_base());// sbrk-managed memory must be above the stack
0 commit comments