Closed ollydev closed 6 years ago
A question, the reason of this PR is to successfully run scripts in Lazarus while debugging. A problem i'm running into is DoCheckInternal
raises a external SIGSEGV here.
Is there any way to handle this more safely?
We could pass along memory boundaries (or pass an array instead of a pointer) to RunCode to determine if something is part of the script.
I decided to add a check to TLapeType_Pointer.VarToString
rather than changing its output. Why did you add checks to the other functions, do you have example of where they caused issues? Or are they just precautionary?
I just tested with your commit and it seems that it resolved the issues and the nil checks are no longer needed.
Updated the commit. Added CodeLen
parameter to RunCode
so we can ensure DoCheckInternal
doesn't check outside of the bytecode.
Thanks!
These are only exceptions that get raised while debugging in lazarus:
AVar
value is something random, but low like4
.