コンパイルは通るけどコアを吐くプログラムだよ
$ cat segv.c
int main(void)
{
int *p = 0;
*p = 0;
return 0;
}
$ gcc -Wall segv.c && ./a.out
Segmentation fault (core dumped)
コンパイルは通るけどコアを吐くプログラムだよ
$ cat segv.c
int main(void)
{
int *p = 0;
*p = 0;
return 0;
}
$ gcc -Wall segv.c && ./a.out
Segmentation fault (core dumped)
If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.zunda.ninja/users/zundan/statuses/115924938761316429 on your instance and quote it. (Note that quoting is not supported in Mastodon.)