Describe the bug
If you get a SEGFAULT in C, the run command output message is inconsistent.
STDOUT and STDERR being UB is acceptable I guess, but it really should notify the SEGFAULT if it's possible.
Apparently it is also inconsistent in CG, so it may be hard to fix.
To Reproduce
Write this C code in a tmp.c file at the root:
#include <stdio.h>
int main() {
printf("Before SEGFAULT\n");
fprintf(stderr, "STDERR Before SEGFAULT\n");
// This doesn't SEGFAULT in CG but it does for me... weird
// int seg[10];
// seg[11] = -1;
// This segfaults in CG but doesnt backtrace the faulty line
// int seg[10];
// seg[1000] = -1;
int *ptr = NULL;
*ptr = 10;
printf("After SEGFAULT\n");
fprintf(stderr, "STDERR After SEGFAULT\n");
return 0;
}
Load any clash, then run the command:
cargo run -- run --build-command "gcc -o tmp tmp.c" --command "./tmp"
Expected behavior

What happens

Describe the bug
If you get a SEGFAULT in C, the
runcommand output message is inconsistent.STDOUT and STDERR being UB is acceptable I guess, but it really should notify the SEGFAULT if it's possible.
Apparently it is also inconsistent in CG, so it may be hard to fix.
To Reproduce
Write this C code in a
tmp.cfile at the root:Load any clash, then run the command:
cargo run -- run --build-command "gcc -o tmp tmp.c" --command "./tmp"Expected behavior

What happens
