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: unassignedb...@nondot.org
          Reporter: s...@chromium.org
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to