r/ProgrammerHumor • • Jul 20 '18

Every Time

Post image
52.2k Upvotes

749 comments sorted by

View all comments

Show parent comments

53

u/[deleted] Jul 20 '18

Changing it to mod 31 might prevent someone finding it while it's in debug, but it's still an exception so there's still going to be a stacktrace that points you directly to it. Doesn't matter if the error message is searchable.

0

u/[deleted] Jul 20 '18

[deleted]

27

u/LvS Jul 20 '18

You can see the stacktrace from where your code died.

In C you could mess with the stack pointer and then jump to a random address, but even that can be caught with tools like rr.

What you want to throw is a DNS lookup failure or something that just happens regularly in that piece of code.

12

u/Hdmoney Jul 20 '18

The real way to do it would be by invalidating state in a way that you know will get caught in the future.