<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ISL object leak in DependenceInfo"
href="https://bugs.llvm.org/show_bug.cgi?id=33927">33927</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ISL object leak in DependenceInfo
</td>
</tr>
<tr>
<th>Product</th>
<td>Polly
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>isl
</td>
</tr>
<tr>
<th>Assignee</th>
<td>polly-dev@googlegroups.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm@meinersbur.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18844" name="attach_18844" title="erc_do_i_0.ll">attachment 18844</a> <a href="attachment.cgi?id=18844&action=edit" title="erc_do_i_0.ll">[details]</a></span>
erc_do_i_0.ll
The attached test case leaks an isl_space. This has likely to to with the
max-operations counter exceeding in the middle of the dependency computation.
$ opt -polly-opt-isl erc_do_i_0.ll
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.
/root/src/llvm/tools/polly/lib/External/isl/isl_ctx.c:253: isl_ctx freed, but
some objects still reference it
Valgrind report:
==32305== 24,118 (56 direct, 24,062 indirect) bytes in 1 blocks are definitely
lost in loss record 48 of 50
==32305== at 0x6144B55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32305== by 0x3378031: isl_calloc_or_die (isl_ctx.c:75)
==32305== by 0x33A46D8: isl_map_alloc_space (isl_map.c:5921)
==32305== by 0x33A49B2: isl_map_empty (isl_map.c:6009)
==32305== by 0x332FE48: isl_map_from_pw_multi_aff (isl_aff.c:4392)
==32305== by 0x33A7122: isl_map_partial_lexopt_aligned (isl_map.c:6808)
==32305== by 0x33A6EAD: isl_map_partial_lexopt (isl_map_lexopt_templ.c:182)
==32305== by 0x33A7182: isl_map_partial_lexmax (isl_map.c:6821)
==32305== by 0x337BBC2: restricted_partial_lexmax (isl_flow.c:589)
==32305== by 0x337BEBC: last_source (isl_flow.c:650)
==32305== by 0x337D567: compute_val_based_dependences (isl_flow.c:1189)
==32305== by 0x337DC61: access_info_compute_flow_core (isl_flow.c:1308)
==32305== by 0x3380B52: compute_single_flow (isl_flow.c:3050)
==32305== by 0x3380E61: compute_flow_schedule (isl_flow.c:3134)
==32305== by 0x3380F64: isl_union_access_info_compute_flow (isl_flow.c:3185)
==32305== by 0x2C1A220: buildFlow(isl_union_map*, isl_union_map*,
isl_union_map*, isl_schedule*) (DependenceInfo.cpp:297)
==32305== by 0x2C1A2D5: buildWAR(isl_union_map*, isl_union_map*,
isl_union_map*, isl_schedule*) (DependenceInfo.cpp:372)
==32305== by 0x2C1A9F0:
polly::Dependences::calculateDependences(polly::Scop&) (DependenceInfo.cpp:542)
==32305== by 0x2C1C65D:
polly::DependenceInfo::recomputeDependences(polly::Dependences::AnalysisLevel)
(DependenceInfo.cpp:967)
==32305== by 0x2C1C5C2:
polly::DependenceInfo::getDependences(polly::Dependences::AnalysisLevel)
(DependenceInfo.cpp:961)
==32305== by 0x2BF24FF: (anonymous
namespace)::IslScheduleOptimizer::runOnScop(polly::Scop&)
(ScheduleOptimizer.cpp:1460)
==32305== by 0x2CC59F0: polly::ScopPass::runOnRegion(llvm::Region*,
llvm::RGPassManager&) (ScopPass.cpp:29)
==32305== by 0x1AB12AD: llvm::RGPassManager::runOnFunction(llvm::Function&)
(RegionPass.cpp:98)
==32305== by 0x21BB035: llvm::FPPassManager::runOnFunction(llvm::Function&)
(LegacyPassManager.cpp:1514)
==32305== by 0x21BB1CE: llvm::FPPassManager::runOnModule(llvm::Module&)
(LegacyPassManager.cpp:1535)
==32305== by 0x21BB549: (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
(LegacyPassManager.cpp:1591)
==32305== by 0x21BBC5E: llvm::legacy::PassManagerImpl::run(llvm::Module&)
(LegacyPassManager.cpp:1694)
==32305== by 0x21BBE6A: llvm::legacy::PassManager::run(llvm::Module&)
(LegacyPassManager.cpp:1725)
==32305== by 0x141C491: main (opt.cpp:756)
Valgrind report (without refcounting):
==31878== 14,776 (80 direct, 14,696 indirect) bytes in 1 blocks are definitely
lost in loss record 29 of 31
==31878== at 0x6142B8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31878== by 0x3377FCC: isl_malloc_or_die (isl_ctx.c:65)
==31878== by 0x341D9EC: isl_space_alloc (isl_space.c:32)
==31878== by 0x342080C: isl_space_join (isl_space.c:1206)
==31878== by 0x3420D7A: isl_space_range_product (isl_space.c:1322)
==31878== by 0x333B2CE: isl_multi_union_pw_aff_range_product_aligned
(isl_multi_templ.c:786)
==31878== by 0x333B25F: isl_multi_union_pw_aff_align_params_multi_multi_and
(isl_multi_templ.c:763)
==31878== by 0x333B402: isl_multi_union_pw_aff_range_product
(isl_multi_templ.c:818)
==31878== by 0x333B7C2: isl_multi_union_pw_aff_flat_range_product
(isl_multi_templ.c:989)
==31878== by 0x33FC56E: collect_filter_prefix_update
(isl_schedule_node.c:563)
==31878== by 0x33FC6FB: collect_filter_prefix (isl_schedule_node.c:634)
==31878== by 0x33FCABA: isl_schedule_node_get_prefix_schedule_relation
(isl_schedule_node.c:799)
==31878== by 0x33806F2: collect_sink_source (isl_flow.c:2887)
==31878== by 0x33FD8C7: preorder_enter (isl_schedule_node.c:1317)
==31878== by 0x33FD7CE: traverse (isl_schedule_node.c:1272)
==31878== by 0x33FD98D: isl_schedule_node_foreach_descendant_top_down
(isl_schedule_node.c:1356)
==31878== by 0x33F8A6A: isl_schedule_foreach_schedule_node_top_down
(isl_schedule.c:355)
==31878== by 0x3380DF4: compute_flow_schedule (isl_flow.c:3124)
==31878== by 0x3380F64: isl_union_access_info_compute_flow (isl_flow.c:3185)
==31878== by 0x2C1A220: buildFlow(isl_union_map*, isl_union_map*,
isl_union_map*, isl_schedule*) (DependenceInfo.cpp:297)
==31878== by 0x2C1A943:
polly::Dependences::calculateDependences(polly::Scop&) (DependenceInfo.cpp:534)
==31878== by 0x2C1C65D:
polly::DependenceInfo::recomputeDependences(polly::Dependences::AnalysisLevel)
(DependenceInfo.cpp:967)
==31878== by 0x2C1C5C2:
polly::DependenceInfo::getDependences(polly::Dependences::AnalysisLevel)
(DependenceInfo.cpp:961)
==31878== by 0x2BF24FF: (anonymous
namespace)::IslScheduleOptimizer::runOnScop(polly::Scop&)
(ScheduleOptimizer.cpp:1460)
==31878== by 0x2CC59F0: polly::ScopPass::runOnRegion(llvm::Region*,
llvm::RGPassManager&) (ScopPass.cpp:29)
==31878== by 0x1AB12AD: llvm::RGPassManager::runOnFunction(llvm::Function&)
(RegionPass.cpp:98)
==31878== by 0x21BB035: llvm::FPPassManager::runOnFunction(llvm::Function&)
(LegacyPassManager.cpp:1514)
==31878== by 0x21BB1CE: llvm::FPPassManager::runOnModule(llvm::Module&)
(LegacyPassManager.cpp:1535)
==31878== by 0x21BB549: (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
(LegacyPassManager.cpp:1591)
==31878== by 0x21BBC5E: llvm::legacy::PassManagerImpl::run(llvm::Module&)
(LegacyPassManager.cpp:1694)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>