Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

bugpoint creates broken module during instruction simplification #4750

Open Quuxplusone opened 15 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR4259
Status NEW
Importance P normal
Reported by Török Edwin (edwin+bugs@etorok.eu)
Reported on 2009-05-24 04:49:50 -0700
Last modified on 2009-05-25 15:03:42 -0700
Version unspecified
Hardware PC Linux
CC efriedma@quicinc.com, llvm-bugs@lists.llvm.org, nicholas@mxc.ca
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Using svn r72361 that has bug reported in PR4258, if I let bugpoint run further
to simplify instructions in the testcase, it crashes because it creates a
broken module.

Testcase is same as for PR4258, but this time for bugpoint, instead of opt:
http://llvm.org/bugs/attachment.cgi?id=3028&action=edit

$ Release/bin/bugpoint bugpoint-reduced-blocks.bc -inline -simplifycfg -loop-
rotate -licm -loop-index-split -indvars

*** Attempting to reduce testcase by deleting instructions: Simplification Level
#1
...
Checking instruction:   call void @llvm.dbg.func.start({ }* bitcast
(%llvm.dbg.subprogram.type* @llvm.dbg.subprogram17754115 to { }*))
invalid llvm.dbg.declare intrinsic call
        call void @llvm.dbg.declare({ }* null, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable22454162 to { }*))
invalid llvm.dbg.declare intrinsic call
        call void @llvm.dbg.declare({ }* null, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable22954167 to { }*))
Broken module found, compilation aborted!
0   bugpoint        0x000000000081498f
1   bugpoint        0x0000000000814d89
2   libpthread.so.0 0x0000003b0a80e7b0
3   libc.so.6       0x0000003b09c32065 gsignal + 53
4   libc.so.6       0x0000003b09c35153 abort + 387
5   bugpoint        0x00000000007d422a
6   bugpoint        0x00000000007adb39
llvm::FPPassManager::runOnFunction(llvm::Function&) + 489
7   bugpoint        0x000000000069e51e
8   bugpoint        0x00000000007ab2dd
llvm::MPPassManager::runOnModule(llvm::Module&) + 301
9   bugpoint        0x00000000007abc60
llvm::PassManagerImpl::run(llvm::Module&) + 160
10  bugpoint        0x00000000004c1679
llvm::BugDriver::runPassesAsChild(std::vector<llvm::PassInfo const*,
std::allocator<llvm::PassInfo const*> > const&) + 953
11  bugpoint        0x00000000004a5af9 llvm::BugDriver::run() + 265
12  bugpoint        0x00000000004cb678 main + 232
13  libc.so.6       0x0000003b09c1e5a6 __libc_start_main + 230
14  bugpoint        0x00000000004a4f79
Stack dump:
0.      Program arguments: Release/bin/bugpoint -as-child -child-output
bugpoint-output.bc -inline bugpoint-input.bc
1.      Running pass 'CallGraph Pass Manager' on module 'bugpoint-input.bc'.
2.      Running pass 'Module Verifier' on function '@BZ2_blockSort'
Crashed with signal #6
Dumped core
Checking instruction:   %0 = bitcast [256 x i32]* null to { }*          ; <{
}*> [#uses=1]
invalid llvm.dbg.declare intrinsic call
        call void @llvm.dbg.declare({ }* null, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable22454162 to { }*))
Broken module found, compilation aborted!
0   bugpoint        0x000000000081498f
1   bugpoint        0x0000000000814d89
2   libpthread.so.0 0x0000003b0a80e7b0
3   libc.so.6       0x0000003b09c32065 gsignal + 53
4   libc.so.6       0x0000003b09c35153 abort + 387
5   bugpoint        0x00000000007d422a
6   bugpoint        0x00000000007adb39
llvm::FPPassManager::runOnFunction(llvm::Function&) + 489
7   bugpoint        0x00000000007adce2
llvm::FPPassManager::runOnModule(llvm::Module&) + 50
8   bugpoint        0x00000000007ab2dd
llvm::MPPassManager::runOnModule(llvm::Module&) + 301
9   bugpoint        0x00000000007abc60
llvm::PassManagerImpl::run(llvm::Module&) + 160
10  bugpoint        0x00000000004b436f
llvm::BugDriver::deleteInstructionFromProgram(llvm::Instruction const*,
unsigned int) const + 831
11  bugpoint        0x00000000004a97d6
12  bugpoint        0x00000000004aa579
llvm::BugDriver::debugOptimizerCrash(std::string const&) + 281
13  bugpoint        0x00000000004a5b42 llvm::BugDriver::run() + 338
14  bugpoint        0x00000000004cb678 main + 232
15  libc.so.6       0x0000003b09c1e5a6 __libc_start_main + 230
16  bugpoint        0x00000000004a4f79
Stack dump:
0.      Program arguments: Release/bin/bugpoint bugpoint-reduced-blocks.bc -
inline -simplifycfg -loop-rotate -licm -loop-index-split -indvars
1.      Running pass 'Function Pass Manager' on module 'bugpoint-reduced-
blocks.bc'.
2.      Running pass 'Module Verifier' on function '@fallbackSort'
Aborted
Quuxplusone commented 15 years ago
(In reply to comment #0)
> Using svn r72361 that has bug reported in PR4258, if I let bugpoint run
further
> to simplify instructions in the testcase, it crashes because it creates a
> broken module.
>
> Testcase is same as for PR4258, but this time for bugpoint, instead of opt:
> http://llvm.org/bugs/attachment.cgi?id=3028&action=edit

No, thats the wrong file. The real testcase is too big to upload to bugzilla,
so here it is:
http://edwintorok.googlepages.com/bugpoint-reduced-blocks.bc.gz
Quuxplusone commented 15 years ago

Mmm, bugpoint plus debug info is trouble. I would try using the -strip-debug pass to remove debug info before trying to reduce a testcase with bugpoint.

Quuxplusone commented 15 years ago
(In reply to comment #2)
> Mmm, bugpoint plus debug info is trouble.  I would try using the -strip-debug
> pass to remove debug info before trying to reduce a testcase with bugpoint.
>

Yes I did that, and then bugpoint was able to reduce the testcase.

However I still think bugpoint should be fixed not to crash on debug info.
It may happen that somebody needs to reduce a bug that occurs only in presence
of debug info.
Quuxplusone commented 15 years ago

Yes, bugpoint + debug info don't get along right now. The fix (IMO) is to make the verifier allow debug info intrinsics to take null arguments.