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.
It seems that your comment contains 1 or more links that are hard to tap for mobile users. I will extend those so they're easier for our sausage fingers to click!
call abort() directly, or if you're worried about someone installing a signal handler, _exit(). Be sure to call if (fork()) _exit(); first to remove any debuggers.
Wait really? I’ve never seen that or thought to do that before. I guess if people ever do that it’s usually to help debug rather than modify it with malicious intent
Would it work if you have it so that instead of throwing an exception that can be traced you catch it or just make it a conditional that will change the return value?
I only started learning C yesterday so I think it would be something like returning a "0" rather than 0? I haven't got that far into C yet.
In python it could be something like:
from random import randint
if randint(0, 31) == 0:`
return "True"
# rest of code
if condition:
return True
return False
Strings would count as truthy so I don't know how much impact it would have but it would be hard to figure out where it came from
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.