Open
Description
The following program:
#include <memory>
struct X {
X() {}
virtual ~X() {};
};
int main() {
std::shared_ptr<X> _asd = std::make_shared<X>();
return 0;
}
Compiled with:
$ clang++ -fsanitize=cfi-unrelated-cast -fvisibility=hidden -flto -O2 -std=c++14 test.cc
on
$ clang++ --version
clang version 13.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
crashes:
$ ./a.out
[1] 21670 illegal hardware instruction (core dumped) ./a.out
I don't see any reason that it should crash - am I doing something wrong?
Here's the gef context one instruction before the crashing instruction (ud1):
Please let me know if there's any more information that I could provide!
Best,
ambiso