add an equivalent to -fsanitize=local-init for C++ constructors #364

Open
thestinger opened this Issue Aug 7, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@thestinger
Contributor

thestinger commented Aug 7, 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.

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

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.

Contributor

thestinger commented Sep 21, 2016

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 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