[LLVMbugs] [Bug 9883] New: Assertion `valid() && "Cannot access invalid iterator"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 9 21:45:39 PDT 2011


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

           Summary: Assertion `valid() && "Cannot access invalid
                    iterator"' 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 tmp022]$ clang -O2 small.c -c -w

clang:
/uusoc/exports/scratch/regehr/z/compiler-build/llvm-r131121/include/llvm/ADT/IntervalMap.h:1315:
KeyT& llvm::IntervalMap<KeyT, ValT, N, Traits>::const_iterator::unsafeStop()
const [with KeyT = llvm::SlotIndex, ValT = llvm::LiveInterval*, unsigned int N
= 8u, Traits = llvm::IntervalMapInfo<llvm::SlotIndex>]: Assertion `valid() &&
"Cannot access invalid iterator"' failed.
0  clang           0x00000000018e525f
1  clang           0x00000000018e74d2
2  libpthread.so.0 0x00007ffff7bcf8f0
3  libc.so.6       0x00007ffff6ebea75 gsignal + 53
4  libc.so.6       0x00007ffff6ec25c0 abort + 384
5  libc.so.6       0x00007ffff6eb7941 __assert_fail + 241
6  clang           0x0000000001581ecf
llvm::RegAllocBase::checkPhysRegInterference(llvm::LiveInterval&, unsigned int)
+ 463
7  clang           0x0000000001483c8b
8  clang           0x00000000014897d4
9  clang           0x000000000148aca1
10 clang           0x0000000001582ea2 llvm::RegAllocBase::allocatePhysRegs() +
594
11 clang           0x0000000001484586
12 clang           0x000000000183287b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 587
13 clang           0x000000000183297b
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
14 clang           0x0000000001832377
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
15 clang           0x000000000183250b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
16 clang           0x00000000007c843e
17 clang           0x00000000007c906d
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 189
18 clang           0x00000000007c5a5b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
19 clang           0x00000000008f724d clang::ParseAST(clang::Sema&, bool) + 413
20 clang           0x00000000007c4da4 clang::CodeGenAction::ExecuteAction() +
68
21 clang           0x00000000006b0cc3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
22 clang           0x0000000000688214
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1268
23 clang           0x000000000067f0cb cc1_main(char const**, char const**, char
const*, void*) + 683
24 clang           0x0000000000687067 main + 6295
25 libc.so.6       0x00007ffff6ea9c4d __libc_start_main + 253
26 clang           0x000000000067d599
Stack dump:
0.    Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r131121-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -coverage-file small.o -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r131121-install/bin/../lib/clang/3.0
-O2 -w -ferror-limit 19 -fmessage-length 80 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c small.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'small.c'.
4.    Running pass 'Greedy Register Allocator' on function '@func_1'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

[regehr at gamow tmp022]$ clang -v

clang version 3.0 (trunk 131121)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[regehr at gamow tmp022]$ cat small.c 


static char
safe_2 (char si1, char si2)
{
  return 0 ? 0 : si1 + 1;
}

struct S0
{
  long f0;
  int f1;
  unsigned f2;
  unsigned f3;
  long f4;
  signed f5:1 ? 32 : 0;
  short f6;
  unsigned f9;
};
int g_2[][0][1] = {
};

int g_30;
int **g_39;
struct S0 g_103 = {
};

int *volatile g_107;
int *g_161;
struct S0 g_183[][0][1] = {
};

static struct S0 *g_244 = &g_183[0][1][0];
static int g_390;
int *volatile g_397;
static int func_12 (short, unsigned char, int **);
int **func_22 (unsigned, unsigned, short);
unsigned
func_1 (void)
{
  func_12 (0, g_2[0][0][0], func_22 (0, 0, 0)), 0;
  return 0;
}

int
func_12 (short p_13, unsigned char p_14, int **p_15)
{
  int ***l_430 = &g_39;
  int l_451;
  int l_443[0][1];
  struct S0 l_477 = {
    0, 0, 1, 1, 0, 305867, 1, 1,
  };
  if (*g_161)
    {
      for (g_30 = 0; g_30 <= 1; g_30 = safe_2 (g_30, 1))
    if (p_14)
      *g_244 = l_477;
      for (l_477.f6 = 0; l_477.f6; l_477.f6 = 1)
    {
      *g_397;
      if (p_14)
        break;
    }
    }
  else
    {
    lbl_494:*g_107;
      for (l_451 = 0; l_451 >= 0; l_451 -= 1)
    for (; l_477.f6; l_477.f6 = 1)
      {
        for (; g_390 < 1; g_390 += 1)
          **l_430 = &l_443[l_451][l_477.f6];
        if (g_103.f0)
          goto lbl_494;
        *g_244 = l_477;
      }
    }
  return 0;
}

-- 
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