Hacker News new | ask | show | jobs
by throwawaymaths 606 days ago
This is terrible, actually. And I've run into it, causing a memory leak.
1 comments

How 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.

Yes. Abort early in unit tests, core dump so it never makes it to prod
The 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.