Consider the following example:
int main()
{
char* p = new char[10];
srand(p[11]); // heap buffer overflow - read
p[11] = rand(); // heap buffer overflow - write
}
I want ASan not to flag heap buffer overflow - read for now, while still flagging heap buffer overflow - write.
The reason I want this is to concentrate on more dangerous errors for now. Read overflow either crash immediately or don't have consequences, whereas write overflow may cause corruption that would trigger elsewhere later. For some small overflows, even immediate crash is excluded. So sure I'd look into read overflows too, but later.
Is there a way to accomplish this?