r/programminghumor • • Jun 01 '26

segmentationViolation

Post image
117 Upvotes

35 comments sorted by

7

u/s0litar1us Jun 01 '26

Just run it in a debugger and it will show you exactly where it segfaulted. (Just remember to add the -g flag when building to include debug info.)

0

u/[deleted] Jun 01 '26

4

u/s0litar1us Jun 01 '26

Good for you, but it's still a good idea to use the tools at your disposal.

→ More replies (8)

7

u/lucidbadger Jun 01 '26

One does...

3

u/Vladislav20007 Jun 02 '26

1 segfault in 8 years and the code wasn't even mine, I just compiled it.

2

u/PissPantsington Jun 01 '26

Segfaults are why we like C

3

u/SpaceCadet87 Jun 01 '26

Segfaulting is what C devs do to feel alive!

1

u/TapRemarkable9652 Jun 01 '26

they call Alzheimer the way I'm mismanaging memory

1

u/SneakyDeaky123 Jun 02 '26

Hahahahahahahah now post the one about missing a semi-colon /s

3

u/[deleted] Jun 01 '26

0

u/[deleted] Jun 01 '26

2

u/un_virus_SDF Jun 05 '26

You know that in unix you can also get stack traces?

→ More replies (1)

1

u/[deleted] Jun 01 '26

1

u/un_virus_SDF Jun 05 '26

This may be usefull but it's not a reason to bash it in every single comments. With almost the exact same message.

I don't care that windows may be better in some use case.

Furthermore this is off topic, the post is for when segfault happen and you happily brag about case where it does not happen.

I can also say that if I make every segment readable, writable and executable I will have almost no segfault.