Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion failed: (use_empty() && "Uses remain when a value is destroyed!"), function ~Value #4786

Closed Quuxplusone closed 15 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR4286
Status RESOLVED FIXED
Importance P normal
Reported by Ed Schouten (ed@80386.nl)
Reported on 2009-05-31 09:04:39 -0700
Last modified on 2009-06-01 04:16:00 -0700
Version trunk
Hardware PC FreeBSD
CC efriedma@quicinc.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments llvm-crash.c (464 bytes, text/plain)
llvm-crash.ll (1447 bytes, text/plain)
llvm-crash.c (161 bytes, text/plain)
llvm-crash.ll (864 bytes, text/plain)
Blocks PR3696
Blocked by
See also
Created attachment 3044
Reduced testcase

When building the attached C code with Clang, I get the following console
output:

$ cc -O2 -pipe   /home/ed/llvm-crash.c  -o llvm-crash
While deleting: i1* %storetmp.i
Use still stuck around after Def is destroyed:  store i1 true, i1* %storetmp.i

Assertion failed: (use_empty() && "Uses remain when a value is destroyed!"),
function ~Value, file .../llvm/lib/VMCore/Value.cpp, line 70.
Stack dump:
0.  Program arguments: /usr/bin/../libexec/clang-cc -triple x86_64-undermydesk-
freebsd8.0 -S -disable-free -main-file-name llvm-crash.c --relocation-model
static --disable-fp-elim --unwind-tables=1 --mcpu=x86-64 --fmath-errno=1 -O2 -
fdiagnostics-show-option -o /tmp/cc-eU01Mt.s -x c /home/ed/llvm-crash.c
1.  <eof> parser at end of file
2.  Per-module optimization passes
3.  Running pass 'CallGraph Pass Manager' on module '/home/ed/llvm-crash.c'.
4.  Running pass 'Scalar Replacement of Aggregates' on function '@pnm_encode'

The testcase is based on source code from the high profile FreeBSD port
`jasper' (a JPEG decoder): http://www.ece.uvic.ca/~mdadams/jasper/
Quuxplusone commented 15 years ago

Attached llvm-crash.c (464 bytes, text/plain): Reduced testcase

Quuxplusone commented 15 years ago

Attached llvm-crash.ll (1447 bytes, text/plain): LLVM IR (created with -O1, not -O2)

Quuxplusone commented 15 years ago

Attached llvm-crash.c (161 bytes, text/plain): Reduced testcase

Quuxplusone commented 15 years ago

Attached llvm-crash.ll (864 bytes, text/plain): LLVM IR (created with -O1, not -O2)

Quuxplusone commented 15 years ago

I have a patch I'll commit in a bit.

Quuxplusone commented 15 years ago

Fixed in r72688.