You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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:Load any clash, then run the command:
cargo run -- run --build-command "gcc -o tmp tmp.c" --command "./tmp"
Expected behavior
![image](https://private-user-images.githubusercontent.com/80173028/313432220-7232145e-acda-450c-a60d-250bbcbaed85.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTUzMDMsIm5iZiI6MTczOTU1NTAwMywicGF0aCI6Ii84MDE3MzAyOC8zMTM0MzIyMjAtNzIzMjE0NWUtYWNkYS00NTBjLWE2MGQtMjUwYmJjYmFlZDg1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE3NDMyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRmZmZlZjk2ODZkZDJkNDc3ODc5ZTFiYjM2OGViNzlkYjg2YmMzM2ZlMzYwNjZmYWYyZDc1ODU0ZTRhYWQ0YTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.VoGTGZ5CrRu9QkcYQxzxQpx8Xij7YF3lZ3m6Y_Qls_U)
What happens
![image](https://private-user-images.githubusercontent.com/80173028/313432105-d78e96a9-32bb-4f99-854d-a4c2c5771944.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTUzMDMsIm5iZiI6MTczOTU1NTAwMywicGF0aCI6Ii84MDE3MzAyOC8zMTM0MzIxMDUtZDc4ZTk2YTktMzJiYi00Zjk5LTg1NGQtYTRjMmM1NzcxOTQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE3NDMyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwMDdhYzJkOGE0NGMyY2RlZDczODY4NzBhMjY1MmJhMmZhMjk4YWQwZWIwNTEwZjk3ZTdkZGFiN2I5MTVkODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pFCtHluUH3sZKrL8viSO5tt-3NPCxe2OLYIUIU4dB5M)
The text was updated successfully, but these errors were encountered: