User Details
- User Since
- Jun 21 2015, 9:00 PM (414 w, 4 d)
Mar 28 2022
The previous patch had unrelated changes inadvertently. Corrected.
Mar 25 2022
Dec 22 2021
Instead, why should the sanitizer not diagnose the use of undefined behavior?
It would be good for the sanitizer to emit a diagnostic about "undefined behavior" (probably a warning). Code that leads to undefined behavior is generally not portable and is a bad programing practice that should be avoided.
Sep 3 2015
Aug 3 2015
Yes, it seems that the global assignments can only be caught using the ASTDecl checker (probably because they do not have an associated "path"?) Please do let me know in case I am wrong in my understanding.
Jul 9 2015
Sure, let me try to take a shot at it.
Jul 7 2015
Here's a short test case that shows the problem:
1 void safe_mul(unsigned long x) { 2 unsigned long multiplier = 1000000000000000000; 3 while (x > 0) { 4 multiplier /= 10; 5 } 6 }
Jul 6 2015
Only a temporary assignment, before being assigned to "signed char" ps_func, and hence safe.
Jul 5 2015
Incorporated further review comments by Daniel.
Working copy updated, built, and tested using check-all.
Jul 1 2015
Incorporated review comments by Daniel.
Updated revisions, rebuilt, retested using check-all.
Jun 29 2015
Missed updating my working copy prior to creating the patch.
Updated, Rebuilt, and tested using check-all.
I had missed a check for initializer on a variable in my previous revision, resulting in a stack dump. Fixed.
Renamed the id and the test file as per Daniel's suggestion to reflect assignment.
Validated with make check-all, which I had missed earlier.
Jun 23 2015
I don't have immediate plans to add more warnings on this, but there definitely are many more cases where we can lose the sign and potentially cause runtime failures.