[llvm-bugs] [Bug 28520] New: type_tag_for_datatype causes clang to crash in some cases.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 12 07:16:02 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28520
Bug ID: 28520
Summary: type_tag_for_datatype causes clang to crash in some
cases.
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: pierregousseau14 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Use of type_tag_for_datatype causes clang to crash in some cases.
clang 3.9 trunk at r275160
Target: x86_64-unknown-linux-gnu
----
static const int test_void
__attribute__((type_tag_for_datatype
(test, void))) = 0;
#define TEST_VOID 0
void test(int datatype, ...)
__attribute__((argument_with_type_tag(test,2,1)));
int main() {
test(TEST_VOID);
return 0;
}
----
clang -c test.c
#0 0x000000000129a165 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
#1 0x00000000012980ce llvm::sys::RunSignalHandlers()
#2 0x0000000001298232 SignalHandler(int)
#3 0x00007fb061f86340 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x0000000001f4caba
clang::Sema::CheckArgumentWithTypeTag(clang::ArgumentWithTypeTagAttr const*,
clang::Expr const* const*)
...
Stack dump:
0. Program arguments: clang-3.9 -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name tag.c -mrelocation-model
static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -coverage-file lab/tag.c -resource-dir
llvm/install/bin/../lib/clang/3.9.0 -internal-isystem /usr/local/include
-internal-isystem llvm/install/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir lab -ferror-limit 19 -fmessage-length 168
-fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o tag.o -x c
tag.c
1. tag.c:10:17: current parser token ')'
2. tag.c:9:12: parsing function body 'main'
3. tag.c:9:12: in compound statement ('{}')
--
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/20160712/e61ea782/attachment.html>
More information about the llvm-bugs
mailing list