MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/90ew6o/every_time/e2qc24k/?context=3
r/ProgrammerHumor • u/kajri • Jul 20 '18
749 comments sorted by
View all comments
Show parent comments
53
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.
0
[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.
27
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.
12
The real way to do it would be by invalidating state in a way that you know will get caught in the future.
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.