Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
add an equivalent to -fsanitize=local-init for C++ constructors #364
Comments
thestinger
added
Type: enhancement
Component: compiler
project
labels
Aug 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Sep 21, 2016
Contributor
An alternative is extending the existing -fsanitize=local-init sanitizer to also zero before calling C++ constructors, since it cannot be assumed that they do full initialization.
|
An alternative is extending the existing -fsanitize=local-init sanitizer to also zero before calling C++ constructors, since it cannot be assumed that they do full initialization. |
thestinger
removed
the
project
label
Sep 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thestinger commentedAug 7, 2016
•
edited
Edited 1 time
-
thestinger
edited Aug 11, 2016
C++ constructors can leave fields uninitialized. A sanitizer should be implemented to zero (note: not default initialize) any fields missing from the initializer list. The compiler can be relied upon to optimize out redundant initialization within the constructor itself in many cases.