Page MenuHomePhabricator

Bug 33221 [UBSAN] segfault with -fsanitize=undefined

Authored by denis13 on May 31 2017, 1:29 AM.



There is can be a situation when vptr is not initializing
by constructor of the object, and has a junk data which should
be properly checked, because c++ standard says:

"if default constructor is not specified
16 (7.3) no initialization is performed."

Diff Detail


Event Timeline

denis13 created this revision.May 31 2017, 1:29 AM
m.ostapenko edited edge metadata.May 31 2017, 1:35 AM
m.ostapenko added a subscriber: llvm-commits.

Please add a testcase (you can take it from Vedant's patch in PR).

m.ostapenko added a project: Restricted Project.May 31 2017, 1:36 AM
denis13 updated this revision to Diff 100881.May 31 2017, 10:06 AM

Test case added

vsk accepted this revision.May 31 2017, 11:38 AM

LGTM. Let me know if you'd like me to commit this for you.

This revision is now accepted and ready to land.May 31 2017, 11:38 AM

It would be great.

This revision was automatically updated to reflect the committed changes.
vsk added a comment.Jun 15 2017, 11:24 AM

Just a heads-up that this necessitated a follow-up fix, see D34215 (landed in r305489).