[LLVMbugs] [Bug 21176] New: option for light-weight poisoning of uninitialized variables
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Oct 6 13:35:02 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21176
Bug ID: 21176
Summary: option for light-weight poisoning of uninitialized
variables
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: jhi at iki.fi
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Tru64 cc used to have a flag called -trapuv which initialized uninitialized
values with 0xfff58005 (repeated, so 64-bit value was 0xfff58005fff58005).
This was a handy value in that it was an illegal pointer value (for Alpha
architecture), and as a floating point value (float or double) it was a signal
NaN. So trying to deference the pointer value or use the fp value lead into a
quick failure (SEGV or FPE).
One cannot win always, of course, in that for integer values the value didn't
(and couldn't) cause a trap, but at least it was not zero, so there was some
change of people noticing that things aren't right.
Some poisoning like this would be a nice light-weight 'sanitizer'. The exact
values for the 'illegal address' and 'signaling nan' would depend on the
architecture.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141006/bcb7669a/attachment.html>
More information about the llvm-bugs
mailing list