add some text to safe heap asserts

This commit is contained in:
Alon Zakai 2014-03-09 18:10:24 -07:00
Родитель d8423a643c
Коммит 86587901bb
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -187,16 +187,16 @@ function SAFE_HEAP_STORE(dest, value, bytes, isFloat) {
Module.print('SAFE_HEAP store: ' + [dest, value, bytes, isFloat]);
#endif
assert(dest > 0, 'segmentation fault');
assert(dest % bytes === 0);
assert(dest < Math.max(DYNAMICTOP, STATICTOP));
assert(dest % bytes === 0, 'alignment error');
assert(dest < Math.max(DYNAMICTOP, STATICTOP), 'segmentation fault (high)');
assert(DYNAMICTOP <= TOTAL_MEMORY);
setValue(dest, value, getSafeHeapType(bytes, isFloat), 1);
}
function SAFE_HEAP_LOAD(dest, bytes, isFloat, unsigned) {
assert(dest > 0, 'segmentation fault');
assert(dest % bytes === 0);
assert(dest < Math.max(DYNAMICTOP, STATICTOP));
assert(dest % bytes === 0, 'alignment error');
assert(dest < Math.max(DYNAMICTOP, STATICTOP), 'segmentation fault (high)');
assert(DYNAMICTOP <= TOTAL_MEMORY);
var type = getSafeHeapType(bytes, isFloat);
var ret = getValue(dest, type, 1);