[llvm-bugs] [Bug 24853] New: bugpoint SEGVs because Module destructor is called multiple times

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 16 18:39:17 PDT 2015


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

            Bug ID: 24853
           Summary: bugpoint SEGVs because Module destructor is called
                    multiple times
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: bugpoint
          Assignee: unassignedbugs at nondot.org
          Reporter: anton at samba.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 14892
  --> https://llvm.org/bugs/attachment.cgi?id=14892&action=edit
Test case

I see a SEGV in bugpoint on ppc64le Linux when running:

# bugpoint -O2 -llc-safe testcase.bc

Looks like we are calling the Module destructor multiple times:

Breakpoint 3, 0x000000001052f2c8 in llvm::Module::~Module (this=0x10c4b540,
__in_chrg=<optimised out>)
    at /home/anton/llvm/lib/IR/Module.cpp:66
66    Module::~Module() {
#0  0x000000001052f2c8 in llvm::Module::~Module (this=0x10c4b540,
__in_chrg=<optimised out>)
    at /home/anton/llvm/lib/IR/Module.cpp:66
#1  0x0000000010120f7c in std::default_delete<llvm::Module>::operator()
(this=<optimised out>, __ptr=0x10c4b540)
    at /usr/include/c++/5/bits/unique_ptr.h:76
#2  std::unique_ptr<llvm::Module, std::default_delete<llvm::Module>
>::~unique_ptr (this=0x3fffffffe570, 
    __in_chrg=<optimised out>) at /usr/include/c++/5/bits/unique_ptr.h:236
#3  TestOptimizer (BD=..., Test=<optimised out>, Safe=<optimised out>,
Error=...)
    at /home/anton/llvm/tools/bugpoint/Miscompilation.cpp:712
#4  0x0000000010124564 in (anonymous
namespace)::ReduceMiscompilingFunctions::TestFuncs (Funcs=..., Error=..., 
    this=0x3fffffffea68, this=0x3fffffffea68) at
/home/anton/llvm/tools/bugpoint/Miscompilation.cpp:278
#5  0x0000000010125894 in (anonymous
namespace)::ReduceMiscompilingFunctions::doTest (Error=..., Suffix=...,
Prefix=..., 
    this=0x3fffffffea68) at
/home/anton/llvm/tools/bugpoint/Miscompilation.cpp:197
#6  llvm::ListReducer<llvm::Function*>::reduceList (this=0x3fffffffea68,
TheList=..., Error=...)
    at /home/anton/llvm/tools/bugpoint/ListReducer.h:55
#7  0x0000000010128ac4 in DebugAMiscompilation (BD=..., 
    TestFn=0x10120d10 <TestOptimizer(llvm::BugDriver&, llvm::Module*,
llvm::Module*, std::__cxx11::string&)>, Error=...)
    at /home/anton/llvm/tools/bugpoint/Miscompilation.cpp:638
#8  0x000000001012b520 in llvm::BugDriver::debugMiscompilation
(this=0x3ffffffff020, Error=0x3fffffffedb8)
    at /home/anton/llvm/tools/bugpoint/Miscompilation.cpp:749
#9  0x00000000101083c4 in llvm::BugDriver::run (this=0x3ffffffff020,
ErrMsg=...)
    at /home/anton/llvm/tools/bugpoint/BugDriver.cpp:212
#10 0x00000000100f155c in main (argc=<optimised out>, argv=<optimised out>)
    at /home/anton/llvm/tools/bugpoint/bugpoint.cpp:204


Breakpoint 3, 0x000000001052f2c8 in llvm::Module::~Module (this=0x10c4b540,
__in_chrg=<optimised out>)
    at /home/anton/llvm/lib/IR/Module.cpp:66
66    Module::~Module() {
#0  0x000000001052f2c8 in llvm::Module::~Module (this=0x10c4b540,
__in_chrg=<optimised out>)
    at /home/anton/llvm/lib/IR/Module.cpp:66
#1  0x000000001012458c in (anonymous
namespace)::ReduceMiscompilingFunctions::TestFuncs (Funcs=..., Error=..., 
    this=0x3fffffffea68, this=0x3fffffffea68) at
/home/anton/llvm/tools/bugpoint/Miscompilation.cpp:280
#2  0x0000000010125894 in (anonymous
namespace)::ReduceMiscompilingFunctions::doTest (Error=..., Suffix=...,
Prefix=..., 
    this=0x3fffffffea68) at
/home/anton/llvm/tools/bugpoint/Miscompilation.cpp:197
#3  llvm::ListReducer<llvm::Function*>::reduceList (this=0x3fffffffea68,
TheList=..., Error=...)
    at /home/anton/llvm/tools/bugpoint/ListReducer.h:55
#4  0x0000000010128ac4 in DebugAMiscompilation (BD=..., 
    TestFn=0x10120d10 <TestOptimizer(llvm::BugDriver&, llvm::Module*,
llvm::Module*, std::__cxx11::string&)>, Error=...)
    at /home/anton/llvm/tools/bugpoint/Miscompilation.cpp:638
#5  0x000000001012b520 in llvm::BugDriver::debugMiscompilation
(this=0x3ffffffff020, Error=0x3fffffffedb8)
    at /home/anton/llvm/tools/bugpoint/Miscompilation.cpp:749
#6  0x00000000101083c4 in llvm::BugDriver::run (this=0x3ffffffff020,
ErrMsg=...)
    at /home/anton/llvm/tools/bugpoint/BugDriver.cpp:212
#7  0x00000000100f155c in main (argc=<optimised out>, argv=<optimised out>)
    at /home/anton/llvm/tools/bugpoint/bugpoint.cpp:204

-- 
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/20150917/a92cd2b5/attachment.html>


More information about the llvm-bugs mailing list