[Bug 272415] clang 16.0.6 and 15.0.7 crash
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 272415] clang 16.0.6 and 15.0.7 crash"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 272415] clang 16.0.6 and 15.0.7 crash"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 272415] clang 16.0.6 and 15.0.7 crash"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 272415] clang 16.0.6 and 15.0.7 crash"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 272415] clang 16.0.6 and 15.0.7 crash"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jul 2023 15:43:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272415
Bug ID: 272415
Summary: clang 16.0.6 and 15.0.7 crash
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: markj@FreeBSD.org
CC: dim@FreeBSD.org
While porting libvmmapi to work on arm64, I am doing some questionable things
with the preprocessor and managed to crash clang. I verified that the problem
occurs with 15.0.7 and 16.0.6; I don't have a development version of LLVM lying
around to test with.
Assertion failed: (Init->containsErrors() && "Dependent code should only occur
in error-recovery path."), function CheckForConstantInitializer, file
/root/freebsd/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp, line 11845.
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 -fno-common
-I/usr/home/markj/src/freebsd/lib/libvmmapi -g -gz=zlib -MD
-MF.depend.vmmapi_machdep.o -MTvmmapi_machdep.o -std=gnu99
-Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmiss
ing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts
-Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-time
-Wmissing-variable-declarations -Wthread-safety -Wno-empty-body
-Wno-string-plus-int -Wno-unused-const-vari
able -Wno-error=unused-but-set-parameter -Qunused-arguments -c
/usr/home/markj/src/freebsd/lib/libvmmapi/amd64/vmmapi_machdep.c -o
vmmapi_machdep.o
1. /usr/home/markj/src/freebsd/lib/libvmmapi/amd64/vmmapi_machdep.c:84:46:
current parser token ';'
#0 0x0000000005390c51 PrintStackTrace
/root/freebsd/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
#1 0x000000000538ef45 RunSignalHandlers
/root/freebsd/contrib/llvm-project/llvm/lib/Support/Signals.cpp:104:18
#2 0x000000000533762e HandleCrash
/root/freebsd/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:76:5
#3 0x00000000053377f3 CrashRecoverySignalHandler
/root/freebsd/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:51
#4 0x0000000806a81b5e handle_signal
/root/freebsd/lib/libthr/thread/thr_sig.c:0:3
#5 0x0000000806a81119 thr_sighandler
/root/freebsd/lib/libthr/thread/thr_sig.c:247:1
#6 0x00007ffffffff2d3 ([vdso]+0x2d3)
#7 0x0000000806d3733a thr_kill
/usr/obj/root/freebsd/amd64.amd64/lib/libc/thr_kill.S:4:0
#8 0x0000000806cafe14 raise /root/freebsd/lib/libc/gen/raise.c:0:10
#9 0x0000000806d60dc9 abort /root/freebsd/lib/libc/stdlib/abort.c:73:17
#10 0x0000000806c92f21 (/lib/libc.so.7+0x93f21)
#11 0x0000000003a46261 (/usr/bin/cc+0x3a46261)
#12 0x0000000003a47f0f AddInitializerToDecl
/root/freebsd/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp:0:7
#13 0x00000000037b364c ParseDeclarationAfterDeclaratorAndAttributes
/root/freebsd/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp:0:17
#14 0x00000000037b0b17 ParseDeclGroup
/root/freebsd/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp:2181:21
#15 0x000000000375cdc0 ParseDeclOrFunctionDefInternal
/root/freebsd/contrib/llvm-project/clang/lib/Parse/Parser.cpp:0:10
#16 0x000000000375c76f ParseDeclarationOrFunctionDefinition
/root/freebsd/contrib/llvm-project/clang/lib/Parse/Parser.cpp:1193:12
#17 0x000000000375b44d ParseExternalDeclaration
/root/freebsd/contrib/llvm-project/clang/lib/Parse/Parser.cpp:0:12
#18 0x00000000037590dc ParseTopLevelDecl
/root/freebsd/contrib/llvm-project/clang/lib/Parse/Parser.cpp:737:10
#19 0x000000000375338e ParseAST
/root/freebsd/contrib/llvm-project/clang/lib/Parse/ParseAST.cpp:161:5
#20 0x000000000311f06f Execute
/root/freebsd/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1041:10
#21 0x00000000030ae81f getPtr
/root/freebsd/contrib/llvm-project/llvm/include/llvm/Support/Error.h:271:42
#22 0x00000000030ae81f operator bool
/root/freebsd/contrib/llvm-project/llvm/include/llvm/Support/Error.h:234:16
#23 0x00000000030ae81f ExecuteAction
/root/freebsd/contrib/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1035:23
#24 0x00000000031dedf4 ExecuteCompilerInvocation
/root/freebsd/contrib/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:266:25
#25 0x000000000264203b cc1_main
/root/freebsd/contrib/llvm-project/clang/tools/driver/cc1_main.cpp:250:15
#26 0x000000000264fb24 ExecuteCC1Tool
/root/freebsd/contrib/llvm-project/clang/tools/driver/driver.cpp:317:12
#27 0x0000000002f58337 operator()
/root/freebsd/contrib/llvm-project/clang/lib/Driver/Job.cpp:407:30
#28 0x0000000002f58337 callback_fn<(lambda at
/root/freebsd/contrib/llvm-project/clang/lib/Driver/Job.cpp:407:22)>
/root/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#29 0x0000000005337565 operator()
/root/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
#30 0x0000000005337565 RunSafely
/root/freebsd/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:425:3
#31 0x0000000002f57f40 Execute
/root/freebsd/contrib/llvm-project/clang/lib/Driver/Job.cpp:407:7
#32 0x0000000002f20ebb ExecuteCommand
/root/freebsd/contrib/llvm-project/clang/lib/Driver/Compilation.cpp:200:15
#33 0x0000000002f21188 ExecuteJobs
/root/freebsd/contrib/llvm-project/clang/lib/Driver/Compilation.cpp:254:13
#34 0x0000000002f38b2f empty
/root/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/SmallVector.h:73:47
#35 0x0000000002f38b2f ExecuteCompilation
/root/freebsd/contrib/llvm-project/clang/lib/Driver/Driver.cpp:1738:23
#36 0x000000000264f551 main
/root/freebsd/contrib/llvm-project/clang/tools/driver/driver.cpp:513:21
cc: error: clang frontend command failed with exit code 134 (use -v to see
invocation)
FreeBSD clang version 15.0.7 (https://github.com/llvm/llvm-project.git
llvmorg-15.0.7-0-g8dfdcc7b7bf6)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/vmmapi_machdep-f24eec.c
cc: note: diagnostic msg: /tmp/vmmapi_machdep-f24eec.sh
--
You are receiving this mail because:
You are the assignee for the bug.