[LLVMbugs] [Bug 14543] New: Assertion `isdigit(*DiagStr) && "Invalid format for argument in diagnostic"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 7 19:41:39 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14543
Bug #: 14543
Summary: Assertion `isdigit(*DiagStr) && "Invalid format for
argument in diagnostic"' failed.
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: silvas at purdue.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
It seems like diag::err_drv_invalid_value is interpreting its argument as a
format string.
clang -cc1 -fdiagnostics-show-category='%d' test.c
clang -cc1 -fdiagnostics-format='%d' ~/test.c
using '%0' generates a different assertion.
sean:~/pg/llvm/r+a_intel % ./bin/clang -cc1 -fdiagnostics-format='%d' ~/test.c
clang: /home/sean/pg/llvm/llvm/tools/clang/lib/Basic/Diagnostic.cpp:725: void
clang::Diagnostic::FormatDiagnostic(const char *, const char *,
llvm::SmallVectorImpl<char> &) const: Assertion `isdigit(*DiagStr) && "Invalid
format for argument in diagnostic"' failed.
0 clang 0x0000000001960e9e
1 clang 0x000000000195ff64
2 libpthread.so.0 0x00007f64dbbd7cb0
3 libc.so.6 0x00007f64db02d425 gsignal + 53
4 libc.so.6 0x00007f64db030b8b abort + 379
5 libc.so.6 0x00007f64db0260ee
6 libc.so.6 0x00007f64db026192
7 clang 0x0000000001969530 clang::Diagnostic::FormatDiagnostic(char
const*, char const*, llvm::SmallVectorImpl<char>&) const + 4608
8 clang 0x0000000001c50cdb
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 75
9 clang 0x000000000196e984
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const + 52
10 clang 0x000000000196de52
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 306
11 clang 0x000000000196ab97
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 119
12 clang 0x0000000001c4fed9
clang::TextDiagnosticBuffer::FlushDiagnostics(clang::DiagnosticsEngine&) const
+ 201
13 clang 0x0000000000a04c80 cc1_main(char const**, char const**, char
const*, void*) + 1712
14 clang 0x00000000009ff48a main + 874
15 libc.so.6 0x00007f64db01876d __libc_start_main + 237
16 clang 0x00000000009ff059
Stack dump:
0. Program arguments: ./bin/clang -cc1 -fdiagnostics-format=%d
/home/sean/test.c
zsh: abort (core dumped) ./bin/clang -cc1 -fdiagnostics-format='%d' ~/test.c
--
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