mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
[BOLT][DWARF] Fix size mismatch error with jemalloc
Summary: When building with GCC and linking against jemalloc there is an assertion when Debug Patches unique pointers are being freed from an std vector. The base destructor gets invoked which results in type mismatch. Added virtual destructor to the base class. (cherry picked from FBD33489259)
This commit is contained in:
committed by
Maksim Panchenko
parent
330c8e42ab
commit
4243b6582c
@@ -498,6 +498,8 @@ public:
|
||||
Patch(uint32_t O, DebugPatchKind K) : Offset(O), Kind(K) {}
|
||||
DebugPatchKind getKind() const { return Kind; }
|
||||
|
||||
virtual ~Patch(){};
|
||||
|
||||
static bool classof(const Patch *Writer) {
|
||||
return Writer->getKind() == DebugPatchKind::PatchBaseClass;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user