aboutsummaryrefslogtreecommitdiff
path: root/src/corruptionCheck.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-01 10:01:16 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-01 10:01:16 -0700
commit18c03af5f0ee66eb0d75ba3892cd31c72ea6d5c2 (patch)
tree499f1d85ab2a8431a1137cecb8f8fb82d4d41f7c /src/corruptionCheck.js
parent48ae14de71a389f29fdb6542e04e1c805788f5bb (diff)
parentcb42d258c2ca1035cac73e7635992d997f9df735 (diff)
Merge branch 'newtriple' into incoming
Diffstat (limited to 'src/corruptionCheck.js')
-rw-r--r--src/corruptionCheck.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corruptionCheck.js b/src/corruptionCheck.js
index 315f5cf0..8b37120a 100644
--- a/src/corruptionCheck.js
+++ b/src/corruptionCheck.js
@@ -42,7 +42,7 @@ var CorruptionChecker = {
CorruptionChecker.checkAll();
var size = CorruptionChecker.ptrs[ptr];
//Module.printErr('free ' + ptr + ' of size ' + size);
- assert(size);
+ assert(size, ptr);
var allocation = ptr - size*CorruptionChecker.BUFFER_FACTOR;
//Module.printErr('free ' + ptr + ' of size ' + size + ' and allocation ' + allocation);
delete CorruptionChecker.ptrs[ptr];
@@ -67,12 +67,12 @@ var CorruptionChecker = {
},
fillBuffer: function(buffer, size) {
for (var x = buffer; x < buffer + size; x++) {
- {{{ makeSetValue('x', 0, 'CorruptionChecker.canary(x)', 'i8') }}};
+ {{{ makeSetValue('x', 0, 'CorruptionChecker.canary(x)', 'i8', null, null, null, 1) }}};
}
},
checkBuffer: function(buffer, size) {
for (var x = buffer; x < buffer + size; x++) {
- if (({{{ makeGetValue('x', 0, 'i8') }}}&255) != CorruptionChecker.canary(x)) {
+ if (({{{ makeGetValue('x', 0, 'i8', null, null, null, null, 1) }}}&255) != CorruptionChecker.canary(x)) {
assert(0, 'Heap corruption detected!' + [x, buffer, size, {{{ makeGetValue('x', 0, 'i8') }}}&255, CorruptionChecker.canary(x)]);
}
}