[llvm-bugs] [Bug 47347] New: After 6d485ff455ea, Assertion failed: (i < getNumParams() && "Illegal param #"), function getParamDecl, file clang/include/clang/AST/Decl.h, line 2430.
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 28 12:35:22 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47347
Bug ID: 47347
Summary: After 6d485ff455ea, Assertion failed: (i <
getNumParams() && "Illegal param #"), function
getParamDecl, file clang/include/clang/AST/Decl.h,
line 2430.
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dimitry at andric.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Bulding the FreeBSD graphics/pgplot results in an assertion:
./pgdispd/updatelgtitle.c:31:8: note: 'sprintf' is a builtin with type 'int
(char *, const char *, ...)'
Assertion failed: (i < getNumParams() && "Illegal param #"), function
getParamDecl, file
/usr/local/poudriere/jails/head-i386/usr/src/contrib/llvm-project/clang/include/clang/AST/Decl.h,
line 2430.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the
crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: cc -O2 -pipe -fstack-protector-strong
-fno-strict-aliasing -I/usr/local/include -DPGDISP -c ./pgdispd/updatelgtitle.c
-o updatelgtitle.o
1. ./pgdispd/updatelgtitle.c:62:8: current parser token ')'
2. ./pgdispd/updatelgtitle.c:21:1: parsing function body 'updatelgtitle'
3. ./pgdispd/updatelgtitle.c:21:1: in compound statement ('{}')
4. ./pgdispd/updatelgtitle.c:37:7: in compound statement ('{}')
Bisection shows this to be caused by https://reviews.llvm.org/D71566 /
https://reviews.llvm.org/rG6d485ff455ea ("Improve static checks for sprintf and
__builtin___sprintf_chk").
Minimized test case:
// clang -cc1 -triple x86_64-- -S updatelgtitle-min.c
int a;
char b;
double c, d;
void e() {
void sprintf();
sprintf(b, "line graphics #%d X %.6g Y %.6g", a, c, d);
}
--
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/20200828/bd9d4e36/attachment.html>
More information about the llvm-bugs
mailing list