add some text to safe heap asserts
This commit is contained in:
Родитель
d8423a643c
Коммит
86587901bb
|
@ -187,16 +187,16 @@ function SAFE_HEAP_STORE(dest, value, bytes, isFloat) {
|
||||||
Module.print('SAFE_HEAP store: ' + [dest, value, bytes, isFloat]);
|
Module.print('SAFE_HEAP store: ' + [dest, value, bytes, isFloat]);
|
||||||
#endif
|
#endif
|
||||||
assert(dest > 0, 'segmentation fault');
|
assert(dest > 0, 'segmentation fault');
|
||||||
assert(dest % bytes === 0);
|
assert(dest % bytes === 0, 'alignment error');
|
||||||
assert(dest < Math.max(DYNAMICTOP, STATICTOP));
|
assert(dest < Math.max(DYNAMICTOP, STATICTOP), 'segmentation fault (high)');
|
||||||
assert(DYNAMICTOP <= TOTAL_MEMORY);
|
assert(DYNAMICTOP <= TOTAL_MEMORY);
|
||||||
setValue(dest, value, getSafeHeapType(bytes, isFloat), 1);
|
setValue(dest, value, getSafeHeapType(bytes, isFloat), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
|
function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
|
||||||
assert(dest > 0, 'segmentation fault');
|
assert(dest > 0, 'segmentation fault');
|
||||||
assert(dest % bytes === 0);
|
assert(dest % bytes === 0, 'alignment error');
|
||||||
assert(dest < Math.max(DYNAMICTOP, STATICTOP));
|
assert(dest < Math.max(DYNAMICTOP, STATICTOP), 'segmentation fault (high)');
|
||||||
assert(DYNAMICTOP <= TOTAL_MEMORY);
|
assert(DYNAMICTOP <= TOTAL_MEMORY);
|
||||||
var type = getSafeHeapType(bytes, isFloat);
|
var type = getSafeHeapType(bytes, isFloat);
|
||||||
var ret = getValue(dest, type, 1);
|
var ret = getValue(dest, type, 1);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче