[llvm-bugs] [Bug 51221] New: Clang's EnumConstantDecl stores an APSInt which leaks memory

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 26 15:39:33 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51221

            Bug ID: 51221
           Summary: Clang's EnumConstantDecl stores an APSInt which leaks
                    memory
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

See the APSInt here:
https://github.com/llvm/llvm-project/blob/58aa3881bac60a497168449b9087e3ebef85a3d8/clang/include/clang/AST/Decl.h#L3042

See the discussion of why we can't store APSInt values in the AST here:
https://github.com/llvm/llvm-project/blob/58aa3881bac60a497168449b9087e3ebef85a3d8/clang/include/clang/AST/Expr.h#L1434

LSan detected a problem in my change 323049329939becf690adbeeff9f5f7e219075ec,
which adds a test of an i128 enum.

-- 
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/20210726/7968cc83/attachment.html>


More information about the llvm-bugs mailing list