Enable address sanitizer

This commit is contained in:
Surma
2020-08-11 18:41:09 +01:00
parent db6dea846a
commit d89e846896
11 changed files with 16735 additions and 185 deletions

View File

@@ -12,5 +12,6 @@ export async function decode(data: ArrayBuffer): Promise<ImageData> {
if (!result) {
throw new Error('Decoding error');
}
module.doLeakCheck();
return result;
}

View File

@@ -14,6 +14,7 @@ export async function encode(data: ImageData, options: EncodeOptions): Promise<A
if (!result) {
throw new Error('Encoding error');
}
module.doLeakCheck();
// wasm cant run on SharedArrayBuffers, so we hard-cast to ArrayBuffer.
return result.buffer as ArrayBuffer;