Skip to content

Commit c853ee8

Browse files
author
Marco Trivellato
authored
Merge pull request #2 from Unity-Technologies/statictop-fix
fix STATICTOP so it does not overlap with tempDoublePtr
2 parents 0cab067 + 2aa7503 commit c853ee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

emscripten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def function_tables_and_exports(funcs, metadata, mem_init, glue, forwarded_data,
330330

331331
staticbump = metadata['staticBump']
332332
while staticbump % 16 != 0: staticbump += 1
333-
pre = pre.replace('STATICTOP = STATIC_BASE + 0;', '''STATICTOP = STATIC_BASE + %d;%s
333+
pre = pre.replace('STATICTOP = STATIC_BASE + 0;', '''STATICTOP = Runtime.alignMemory(STATIC_BASE, 16) + %d;%s
334334
/* global initializers */ %s __ATINIT__.push(%s);
335335
%s''' % (staticbump,
336336
'assert(STATICTOP < SPLIT_MEMORY, "SPLIT_MEMORY size must be big enough so the entire static memory, need " + STATICTOP);' if settings['SPLIT_MEMORY'] else '',

0 commit comments

Comments
 (0)