aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-31 14:11:01 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-31 14:11:01 -0800
commitfdf62e89373283f644be32e6c1749f5cb120bac7 (patch)
tree072e6b5f6e6230f31caffb37de163fdaebd469e7 /src
parent153fd346c585c730da7b132988cc52833057497a (diff)
fix bootstrap memset safe heap access
Diffstat (limited to 'src')
-rw-r--r--src/preamble.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 8a68736e..aab50e9a 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -35,8 +35,8 @@ function SAFE_HEAP_ACCESS(dest, type, store, ignore) {
// When using typed arrays, reads over the top of TOTAL_MEMORY will fail silently, so we must
// correct that by growing TOTAL_MEMORY as needed. Without typed arrays, memory is a normal
// JS array so it will work (potentially slowly, depending on the engine).
- assert(dest < STATICTOP);
- assert(STATICTOP <= TOTAL_MEMORY);
+ assert(ignore || dest < STATICTOP);
+ assert(ignore || STATICTOP <= TOTAL_MEMORY);
#endif
#if USE_TYPED_ARRAYS == 2
@@ -482,7 +482,7 @@ Module['ALLOC_NONE'] = ALLOC_NONE;
var _memset = function(ptr, value, num) {
var stop = ptr + num;
while (ptr < stop) {
- {{{ makeSetValueAsm('ptr++', 0, 'value', 'i8', null, null, null, true) }}};
+ {{{ makeSetValue('ptr++', 0, 'value', 'i8', null, true) }}};
}
}