|
From: Andrada G. <and...@gm...> - 2011-03-25 07:35:28
|
Hi! I've been using the exp-ptrcheck for inspecting array bounds errors and found there are several cases where I would expect it work but doesn't (better said reporting errors): 1. Using a constant index value for an array on the stack resulting in an invalid access. I got from the documentation that the first access has to be valid; my code does that. I've noticed that detection works OK in for loop, but, when unrolled (for example when using -O2 option for optimization in GCC), exp-ptrcheck doesn't detect errors. int s[5]; s[4] = 42; s[5] = 42; // nothing happens 2. Another case when it cannot detect the error is when using memset: char y[5]; memset(y, 'a', 10); 3. Another thing I've noticed is that it doesn't correctly report errors when using variable length arrays (it reports errors all the time, even when used correctly). Is exp-ptrcheck unable to detect these situations or the required features are not yet implemented (or difficult to implement)? Thank you very much! Regards, Andrada |