You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the crypto.js file, the _free function is not implemented. Right?
It seems this causes a bug:
function sc_reduce32(hex) {
var input = hextobin(hex);
if (input?.length !== 32) {
throw "Invalid input length";
}
// Module._malloc() return the address of the alloced memory - the pointer
var mem = Module._malloc(32);
Module.HEAPU8.set(input, mem);
Module.ccall('sc_reduce32', 'void', ['number'], [mem]);
var output = Module.HEAPU8.subarray(mem, mem + 32);
Module._free(mem);
return bintohex(output);
};
In the above snippet of code, since the memory is not actually freed, so if you run this function, say 10k times, then the crypto.js will throw an error:
Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.
The text was updated successfully, but these errors were encountered:
https://github.com/luigi1111/xmr.llcoins.net/blob/master/site/js/crypto.js
In the crypto.js file, the
_free
function is not implemented. Right?It seems this causes a bug:
In the above snippet of code, since the memory is not actually freed, so if you run this function, say 10k times, then the crypto.js will throw an error:
The text was updated successfully, but these errors were encountered: