[llvm-bugs] [Bug 45452] New: MCSymbolWasm is not trivially destructible
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 6 17:56:02 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45452
Bug ID: 45452
Summary: MCSymbolWasm is not trivially destructible
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: MC
Assignee: unassignedbugs at nondot.org
Reporter: sbc at chromium.org
CC: llvm-bugs at lists.llvm.org
It seems that the MCSymbol class and its subclasses need to be trivially
destructible since MCContext doesn't destructors for each symbol during
::reset(). It only calls `Symbols.clear();`.
Currently there are 3 optional std::string fields that leak memory. Until
recently none of our test cases caught this (I believe) because all our tests
involved small string that didn't allocate. But recently this change
triggered an lsan warning: https://reviews.llvm.org/D77192.
When we fix this we should add static asserts that these classes are trivially
destructible.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200407/4472bac5/attachment.html>
More information about the llvm-bugs
mailing list