diff options
author | Alon Zakai <azakai@mozilla.com> | 2011-02-04 20:58:35 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2011-02-04 20:58:35 -0800 |
commit | 94db1931556f0476b40d268db641a68e6fa353ee (patch) | |
tree | 62c7a15f15a31136013316a3b9bd3de6a95bc396 /src/library.js | |
parent | b6aeefa650fb91865c01d6e0f96b55f94c23cbff (diff) |
unsign in zext to prevent a sign error
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index b60bd07f..4b315a9e 100644 --- a/src/library.js +++ b/src/library.js @@ -168,6 +168,12 @@ var Library = { } } return Pointer_make(ret.concat(0), 0, ALLOC_STACK); // NB: Stored on the stack + //var len = ret.length+1; + //var ret = Pointer_make(ret.concat(0), 0, ALLOC_STACK); // NB: Stored on the stack + //STACKTOP -= len; // XXX horrible hack. we rewind the stack, to 'undo' the alloc we just did. + // // the point is that this works if nothing else allocs on the stack before + // // the string is read, which should be true - it is very transient, see the *printf* functions below. + //return ret; }, printf__deps: ['_formatString'], @@ -451,7 +457,7 @@ var Library = { exit: function(status) { __shutdownRuntime__(); ABORT = true; - throw 'exit(' + status + ') called.'; + throw 'exit(' + status + ') called, at ' + new Error().stack; }, atexit: function(func) { @@ -541,6 +547,7 @@ var Library = { // TODO: optimize for the typed arrays case // || 0, since memcpy sometimes copies uninitialized areas XXX: Investigate why initializing alloc'ed memory does not fix that too {{{ makeCopyValue('dest', 'i', 'src', 'i', 'null', ' || 0') }}}; + // XXX Try copying the safe-heap type info, instead of using null } }, llvm_memcpy_i32: 'memcpy', |