[LLVMbugs] [Bug 20124] New: EVT instances refer indirectly to a specific LLVMContext
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jun 25 07:15:58 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20124
Bug ID: 20124
Summary: EVT instances refer indirectly to a specific
LLVMContext
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: Mathias.Froehlich at web.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
This report is based on a request at llvmdev at
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074145.html
This is about an observation that the EVT's cached and returned from
SDNode::getValueTypeList(EVT VT)
are keyed by the llvm::Type pointer which in turn refer to a LLVMContext.
But that, if you use several LLVMContext instances over the lifetime of
a program, this EVT map seems to accumulate new entries for each new
LLVMContext
that is used.
The memory is correctly freed on destruction of managed singletons, but until
then it is kept around. This matches in effect the behavior of a memory leak,
even if being finally freed at the end and by that not being a memory leak in
it's strong sense.
I cannot talk about llvm's internal structure, but given the comments in the
above mentioned mailing list thread this reference chain seems to be unwanted
for
other reasons also.
Thanks in advance
Mathias
--
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/20140625/34ca31e7/attachment.html>
More information about the llvm-bugs
mailing list