Live data from Hacker News

Every programmer should read the source to abort() at some point in their life.

reddit.com

11–20 of 61 posts

Re: Every programmer should read the source to abort() at some point in their life.

#13
post #10

Plan 9's abort causes an access fault, causing the current process to enter the `Broken' state. The process can then be inspected by a debugger. Pretty elegant. http://plan9.bell-labs.com/sources/plan9/sys/src/libc/9sys/a...

Beautiful! The gurus do not disappoint.

Re: Every programmer should read the source to abort() at some point in their life.

#15
post #10

Plan 9's abort causes an access fault, causing the current process to enter the `Broken' state. The process can then be inspected by a debugger. Pretty elegant. http://plan9.bell-labs.com/sources/plan9/sys/src/libc/9sys/a...

again, what's with the while()? even if it doesnt cause a segmentation fault, there's a chance it will evaluate to 0.

Re: Every programmer should read the source to abort() at some point in their life.

#17
post #10

Plan 9's abort causes an access fault, causing the current process to enter the `Broken' state. The process can then be inspected by a debugger. Pretty elegant. http://plan9.bell-labs.com/sources/plan9/sys/src/libc/9sys/a...

In practical terms, does this differ significantly from killing the process and leaving a coredump?

Re: Every programmer should read the source to abort() at some point in their life.

#18
post #10

Plan 9's abort causes an access fault, causing the current process to enter the `Broken' state. The process can then be inspected by a debugger. Pretty elegant. http://plan9.bell-labs.com/sources/plan9/sys/src/libc/9sys/a...

Very elegant, though in some cases 0x0 is addressable, in which case, the abort never happens.
Post reply on HN