Closed alexzanderr closed 1 year ago
Yes, panics do indeed abort (SIGABRT) due to -Cpanic=abort
being the only mode supported by cg_clif. Note that this is not a segfault (SIGSEGV), but a controlled abort()
call. Both do indeed write core dumps by default on some distros. Depending on the amount of memory the process used, this can take a while. If you want to disable core dumping, you should be able to run ulimit -c 0
in the terminal from which you run the compiled program. This will only apply to processes spawned from this specific terminal and won't persist once you close it.
wow, very nice guide. thanks a lot.
I believe I answered your question. If not, feel free ask more though.
so i the way i need to run is like this? :
> ulimit -c 0 && cargo run # (panic abort project)
or
> ulimit -c 0
# then after, being a separate command
> cargo run
ok, i can confirm that both ways are achieving the same result.
and indeed, i can confirm that is working (ulimit -c 0
), the program is not writing core-dumps anymore into the system, so right now the process closes immediately.
thanks a lot for the response!
The second one definitively works. The first one may or may not work. ulimit is a command built into your shell which changes the "resource limits" of the shell itself, any processes started by the shell then inherit these "resource limits".
yeah. indeed.
hello
im getting a panic inside my project from the crates that im using.
by running in terminal this happened:
Aborted (core dumped)
i've saw this in the readme
and also saw that cleanup is requested as an open issue and its still open so no cleanup right now.
so my guess is that cranelift compiles code with panic=abort by default both in debug and release mode. right?
and when the rust program panics with panic=abort it will create a segfault. right? (this is what i saw in the past when running a release binary with panic=abort)
this is expected to happen right? im assuming, but i need your confirmation.
thanks in advance.