3 ms·
This is terrible, actually. And I've run into it, causing a memory leak.
by throwawaymaths 2y ago
This is terrible, actually. And I've run into it, causing a memory leak.
- filmor 2y agoHow so? The whole point of unwinding is to gracefully clear up on panics, how did it peak for you? It's also not like there is much of a choice here. Unwinding across FFI boundaries (e.g. out of the NIF call) is undefined behaviour, so the only other option is aborting on panics.
- throwawaymaths 2y agoYes. Abort early in unit tests, core dump so it never makes it to prod
- filmor 2y agoThe panic is converted to an Erlang error exception. You have to explicitly ignore it to make unit tests pass in spite of it. I am still interested in the situation you observed.