[LLVMbugs] [Bug 8068] New: Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 2 21:46:31 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8068

           Summary: Assertion `use_empty() && "Uses remain when a value is
                    destroyed!"' failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu


[regehr at gamow tmp425]$ clang -v

clang version 2.8 (trunk 112720)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[regehr at gamow tmp425]$ cat small.c

typedef short int int16_t;
typedef int int32_t;
typedef unsigned char uint8_t;
static int16_t
safe_add_func_int32_t_s_s (int32_t si1, int16_t si2)
{
  return si1 > 0 && si2 > 0 && si1 > -si2 || si1 < 0 && si2 < 0
    && si1 < -si2 ? : si1 + si2;
}

uint8_t g_12;
int16_t *g_74[4][4][5] = {
};

int16_t **g_76[6] = {
  &g_74[0][3][3], &g_74[0][3][3], &g_74[0][3][3], &g_74[0][3][3],
  &g_74[0][3][3], &g_74[0][3][3]
};

int16_t ***volatile g_75 = &g_76[0];
int16_t
func_40 (int32_t * const p_41)
{
}

int326 (int32_t *** p_107, int16_t *** p_108, int16_t p_109, int16_t p_110)
{
  for (g_12 = 1; g_12; g_12 = safe_add_func_int32_t_s_s (g_12, 0))
    {
      for (g_12 = 0;; 1)
        break;
      if (func_40 (**g_75))
        {
        }
    }
}

[regehr at gamow tmp425]$ clang -O2 -c small.c -w

While deleting: i8 %tmp6
Use still stuck around after Def is destroyed:  store i8 %tmp6, i8* @g_12
clang: Value.cpp:75: virtual llvm::Value::~Value(): Assertion `use_empty() &&
"Uses remain when a value is destroyed!"' failed.
0  clang           0x000000000166ebff
1  clang           0x0000000001670e72
2  libpthread.so.0 0x00007fc545521190
3  libc.so.6       0x00007fc5448264b5 gsignal + 53
4  libc.so.6       0x00007fc544829f50 abort + 384
5  libc.so.6       0x00007fc54481f481 __assert_fail + 241
6  clang           0x00000000015cbb83 llvm::Value::~Value() + 995
7  clang           0x0000000001596387 llvm::LoadInst::~LoadInst() + 23
8  clang           0x00000000013a731c
9  clang           0x00000000013a7bab
10 clang           0x00000000014ca2c4
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1060
11 clang           0x00000000015b4aed
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
12 clang           0x000000000149810b
13 clang           0x0000000001498865
14 clang           0x00000000015b4684
llvm::MPPassManager::runOnModule(llvm::Module&) + 500
15 clang           0x00000000015b47f7 llvm::PassManagerImpl::run(llvm::Module&)
+ 167
16 clang           0x00000000007c7917
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1623
17 clang           0x00000000007c3a2b
18 clang           0x00000000008e0593 clang::ParseAST(clang::Sema&, bool) + 291
19 clang           0x00000000007c4a14 clang::CodeGenAction::ExecuteAction() +
68
20 clang           0x00000000006d2ebd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 349
21 clang           0x00000000006b152c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1292
22 clang           0x00000000006a9363 cc1_main(char const**, char const**, char
const*, void*) + 467
23 clang           0x00000000006b0125 main + 4133
24 libc.so.6       0x00007fc544811abd __libc_start_main + 253
25 clang           0x00000000006a7ce9
Stack dump:
0.      Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r112720-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name small.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.20 -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r112720-install/lib/clang/2.8
-O2 -w -ferror-limit 19 -fmessage-length 95 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-L6xohy.s -x c small.c 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module 'small.c'.
4.      Running pass 'Loop Pass Manager' on function '@int326'
5.      Running pass 'Loop Invariant Code Motion' on basic block '%for.body'
clang: error: clang frontend command failed due to signal 6 (use -v to see
invocation)
[regehr at gamow tmp425]$

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list