Open nicolasbrailo opened 4 years ago
When targeting environments such as WASM with no standard libraries at all, terminating functions (e.g. assert()
, abort()
, exit()
) require implementations at run-time. Since the trap is a debugging utility, it would better be a no-op (or something that compiles to unreachable
in WASM to throw out to the JavaScript run-time) than linking in more code that never runs.
This seems to be a duplicate of #6 .
I noticed some places try to crash the application using
Is there a reason not to use assert(1) from the std lib?
$ grep -nri '\*(int' src/rnn.c:99: *(int*)0 = 0; src/rnn.c:145: *(int*)0 = 0;