[ubsan] Fix for vptr check 29/131529/3 submit/tizen_base/20170613.074657 submit/tizen_base/20170705.023439
authorDenis Khalikov <d.khalikov@partner.samsung.com>
Mon, 29 May 2017 17:35:03 +0000 (20:35 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 13 Jun 2017 07:13:15 +0000 (07:13 +0000)
commit0b7063a7415d107715e262ed8b9a03ff14af223e
treefed37ea5723d18a3cd97aa14de0aa0c300ae8671
parent10747d7c26bb7c0c4e2e8761256e44b82e63f47a
[ubsan] Fix for vptr check

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

"If the new-initializer is omitted, the object is default-initialized (8.5).
[ Note: If no initialization is performed,
 the object has an indeterminate value. — end note ]

Change-Id: I6fd297dc10b2ddb54eaed9e6eb3a46310dafead4
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
gcc/testsuite/g++.dg/ubsan/pr332211-llvm.C [new file with mode: 0644]
libsanitizer/ubsan/ubsan_type_hash_itanium.cc