You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nidhugg does not detect when the program under test segfaults by attempting to call an invalid function pointer (see MWE attached below). I would expect Nidhugg to detect this and print an error about the program under test causing a segmentation fault (as it does when dereferencing an invalid non-function pointer) but this apparently does not work for function pointers causing Nidhugg itself to segfault.
Thank you for your report, your example reproduces the problem nicely.
Because nidhugg is built on top of the llvm interpreter, and the llvm interpreter is not defensively implemented, there are unfortunately these kinds of behaviours in several places.
For this one, I guess we have to validate function pointers towards a list of known functions during indirect calls. I hope that's not hard to do.
Nidhugg does not detect when the program under test segfaults by attempting to call an invalid function pointer (see MWE attached below). I would expect Nidhugg to detect this and print an error about the program under test causing a segmentation fault (as it does when dereferencing an invalid non-function pointer) but this apparently does not work for function pointers causing Nidhugg itself to segfault.
segfaulttest.zip
The text was updated successfully, but these errors were encountered: