the include! macro can be used to crash systemd and force user to re-login.
I have tested this on linux 6.12.1 with sublime-text and rust-enhanced
plugin but it should affect all situations where rustc is spawned as
child process.
Example:
compile_error!(include!("/dev/zero"));
This will fill up all ram at compile time until rustc is OOM-aborted by
the kernel.
Then the IDE (in my case sublime-text) will try to read the compile
error message via the open pipe to rustc it will also be OOM-aborted.
On my system this results in full systemd crash. User will be shown
login screen again, all programs are closed. Just from compiling rust code.
the include! macro can be used to crash systemd and force user to re-login.
I have tested this on linux 6.12.1 with sublime-text and rust-enhanced
plugin but it should affect all situations where rustc is spawned as
child process.
Example:
compile_error!(include!("/dev/zero"));This will fill up all ram at compile time until rustc is OOM-aborted by
the kernel.
Then the IDE (in my case sublime-text) will try to read the compile
error message via the open pipe to rustc it will also be OOM-aborted.
On my system this results in full systemd crash. User will be shown
login screen again, all programs are closed. Just from compiling rust code.