ASan: add sanitizing GC allocated memory
A bug like this should be caught by ASan (simplified testcase of course, so boundscheck=off):
int getX()
{
byte[] x = new byte[5];
return x[5];
}
See testcase sanitizers/asan_dynalloc.d from PR #2228 .
See https://forum.dlang.org/post/[email protected]
Any update on the status of this issue? 🤔 It seems that one of the PRs you mentioned is already merged.
I have not looked into this for a while. It is certainly not working (the merged PR contains a disabled test case).
Implementing this will require an LLVM change by the way. Edit: this is not quite accurate. This is implementable without modifying LLVM. Good error messages will require LLVM changes, but not error detection itself (druntime GC changes only)