[LLVMbugs] [Bug 20693] New: ICE in alpha.core.IdenticalExpr : AST/Expr.h:1509: llvm::StringRef clang::StringLiteral::getString() const: Assertion `CharByteWidth==1

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 18 01:44:04 PDT 2014


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

            Bug ID: 20693
           Summary: ICE in alpha.core.IdenticalExpr : AST/Expr.h:1509:
                    llvm::StringRef clang::StringLiteral::getString()
                    const: Assertion `CharByteWidth==1
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: dimhen at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ /usr/local/llvm/bin/clang++ -v
clang version 3.6.0 (trunk 215885)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/4.8.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.3
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.3
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

$ cat x.ii
int fn1(const wchar_t *);
void fn2() {
  int a = fn1(0 ? L"Request" : L"My");
  try {
    if (a) {
    }
  }
  catch (...) {
  }
}

$ /usr/local/llvm/bin/clang++ -cc1 -analyze -fcxx-exceptions -analyzer-checker
alpha.core.IdenticalExpr -x c++ x.ii
clang++:
/home/dimhen/src/llvm/tools/clang/lib/StaticAnalyzer/Checkers/../../../include/clang/AST/Expr.h:1509:
llvm::StringRef clang::StringLiteral::getString() const: Assertion
`CharByteWidth==1 && "This function is used in places that assume strings use
char"' failed.
0  clang++         0x0000000002059a92 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang++         0x00000000020596b4
2  libpthread.so.0 0x0000003998c0f750
3  libc.so.6       0x0000003998835c39 gsignal + 57
4  libc.so.6       0x0000003998837348 abort + 328
5  libc.so.6       0x000000399882eb96
6  libc.so.6       0x000000399882ec42
7  clang++         0x0000000000e91e30
8  clang++         0x0000000000e941d5
9  clang++         0x0000000000e93646
10 clang++         0x0000000000e942d0
11 clang++         0x0000000000e974ef
12 clang++         0x0000000000e9590d
13 clang++         0x0000000000e98150
14 clang++         0x0000000000e9574d
15 clang++         0x0000000000e9c375
16 clang++         0x0000000000e9c8fd
17 clang++         0x0000000000e9593d
18 clang++         0x0000000000e972df
19 clang++         0x0000000000e9595d
20 clang++         0x0000000000e9b355
21 clang++         0x0000000000e9cabb
22 clang++         0x0000000000faa4dd
clang::ento::CheckerManager::runCheckersOnASTBody(clang::Decl const*,
clang::ento::AnalysisManager&, clang::ento::BugReporter&) + 125
23 clang++         0x0000000000e57ee2
24 clang++         0x0000000000e642e6
25 clang++         0x0000000000e59baa
26 clang++         0x0000000000e6506d
27 clang++         0x00000000009e2ad3 clang::ParseAST(clang::Sema&, bool, bool)
+ 483
28 clang++         0x0000000000694586 clang::FrontendAction::Execute() + 118
29 clang++         0x0000000000672680
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 320
30 clang++         0x000000000065aabe
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2014
31 clang++         0x0000000000651b20 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 1040
32 clang++         0x0000000000659def main + 4879
33 libc.so.6       0x0000003998821d65 __libc_start_main + 245
34 clang++         0x0000000000650889
Stack dump:
0.    Program arguments: /usr/local/llvm/bin/clang++ -cc1 -analyze
-fcxx-exceptions -analyzer-checker alpha.core.IdenticalExpr -x c++ x.ii 
1.    <eof> parser at end of file

-- 
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/20140818/c48ecdf1/attachment.html>


More information about the llvm-bugs mailing list