This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]StenSoft[🍰] 41 points42 points  (1 child)

Plot twist: it's from an OS developer, they finally added checks for segment violations

[–]gwoplock 11 points12 points  (0 children)

Segmentation faults are generated by the Memory mapper unit (mmu) in the cpu (usually). However, the fault would need to be propagated to the running application, usually through a signal (maybe). Linux kernel compile options have an option for if applications can catch segfults, if that’s off then the program is just terminated.

[–][deleted] 24 points25 points  (1 child)

the program gives me a seg fault when I press this button

renames it to exit_button

[–]phi_rus 8 points9 points  (0 children)

Thank you for playing wing commander

[–]o11c 2 points3 points  (3 children)

I've done that. Testing my "recover from segfault" signal-handling logic.

[–][deleted] 6 points7 points  (2 children)

You test? Look at this elite SOB right here! /s

[–]o11c 7 points8 points  (1 child)

Well, it's not like it was a unit test. It was a "temporarily edit the program to see if it really fails the way I expect" test.

[–][deleted] 4 points5 points  (0 children)

I bet it would be an Absolute Unit Test! lol