Opened 7 months ago

Closed 3 months ago

#18903 closed bug (fixed)

Clang 17.0.6-2 crashes with SEGV in clang::Lexer::LexCharConstant()

Reported by: dovsienko Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: x86-64

Description

I was running a manual test of the latest tcpdump-4.99 branch on the most recent nightly snapshot (hrev57736 with all updates and freshly rebooted), which used to pass. This time it was running fine for a while, and then failed because Clang processes started to segfault. I saved all five crash reports (attached), each tells clang::Lexer::LexCharConstant() as the code location (also note the odd error messages from the compiler below). So it looks possible something is wrong with the package, please have a look and let me know if you need any additional information.

For reference, this is what it looked in the terminal:

./build_matrix.sh
[...]
===== SETUP 29: CC=clang BUILD_LIBPCAP=yes REMOTE=no CMAKE=yes CRYPTO=no SMB=no =====
In file included from /boot/home/gitrepos/tcpdump/addrtoname.c:96:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap.h:43:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/pcap.h:133:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/bpf.h:83:
/boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/dlt.h:1613:1: error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: unknown type name 'p'
error: expected identifier or '('
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: source file is not valid UTF-8
error: source file is not valid UTF-8
fatal error: too many errors emitted, stopping now [-ferror-limit=]
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /bin/clang -I/boot/home/gitrepos/tcpdump/build -I/boot/home/gitrepos/tcpdump -isystem /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include -std=gnu99 -W -Wall -Wassign-enum -Wcast-qual -Wmissing-prototypes -Wmissing-variable-declarations -Wold-style-definition -Wpedantic -Wpointer-arith -Wpointer-sign -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef -Wunreachable-code-return -Wused-but-marked-unused -Wwrite-strings -Werror -MD -MT CMakeFiles/netdissect.dir/addrtoname.c.o -MF CMakeFiles/netdissect.dir/addrtoname.c.o.d -o CMakeFiles/netdissect.dir/addrtoname.c.o -c /boot/home/gitrepos/tcpdump/addrtoname.c
1.	<unknown> parser at unknown location
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 17.0.6
Target: x86_64-unknown-haiku
Thread model: posix
InstalledDir: /bin
In file included from /boot/home/gitrepos/tcpdump/af.c:21:
In file included from /boot/home/gitrepos/tcpdump/netdissect.h:128:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap.h:43:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/pcap.h:133:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/bpf.h:83:
/boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/dlt.h:1613:1: error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: unknown type name 'p'
error: expected identifier or '('
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: source file is not valid UTF-8
error: source file is not valid UTF-8
fatal error: too many errors emitted, stopping now [-ferror-limit=]
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /bin/clang -I/boot/home/gitrepos/tcpdump/build -I/boot/home/gitrepos/tcpdump -isystem /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include -std=gnu99 -W -Wall -Wassign-enum -Wcast-qual -Wmissing-prototypes -Wmissing-variable-declarations -Wold-style-definition -Wpedantic -Wpointer-arith -Wpointer-sign -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef -Wunreachable-code-return -Wused-but-marked-unused -Wwrite-strings -Werror -MD -MT CMakeFiles/netdissect.dir/af.c.o -MF CMakeFiles/netdissect.dir/af.c.o.d -o CMakeFiles/netdissect.dir/af.c.o -c /boot/home/gitrepos/tcpdump/af.c
1.	<unknown> parser at unknown location
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 17.0.6
Target: x86_64-unknown-haiku
Thread model: posix
InstalledDir: /bin
In file included from /boot/home/gitrepos/tcpdump/checksum.c:28:
In file included from /boot/home/gitrepos/tcpdump/netdissect.h:128:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap.h:43:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/pcap.h:133:
In file included from /boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/bpf.h:83:
/boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/dlt.h:1613:1: error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: unknown type name 'p'
error: expected identifier or '('
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: source file is not valid UTF-8
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: source file is not valid UTF-8
error: source file is not valid UTF-8
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from /boot/home/gitrepos/tcpdump/cpack.c:PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
36Stack dump:
:
0In file included from .	/boot/home/gitrepos/tcpdump/netdissect.hProgram arguments: :/128b:
iIn file included from n/boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap.h/:c43l:
aIn file included from n/boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/pcap.hg: 133-:
IIn file included from //boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/bpf.hb:o83o:
t//boot/system/var/shared_memory/tcpdump_build_matrix.m2klUS67/include/pcap/dlt.hh:o1613m:e1/:g itrerror: eposource file is not valid UTF-8s/
tcpdump/build -I/boot/home/giterror: repsource file is not valid UTF-8os
/tcerror: pdusource file is not valid UTF-8mp
 -ierror: sysnull character ignored [-Werror,-Wnull-character]te
m /error: boonull character ignored [-Werror,-Wnull-character]t/
syerror: stenull character ignored [-Werror,-Wnull-character]m/
var/error: shaunknown type name 'p're
d_merror: emoexpected identifier or '('ry
/tcerror: pdusource file is not valid UTF-8mp
_buerror: ildsource file is not valid UTF-8_m
atrerror: ix.null character ignored [-Werror,-Wnull-character]m2
klUerror: S67null character ignored [-Werror,-Wnull-character]/i
nclerror: udesource file is not valid UTF-8 -
stderror: =gnsource file is not valid UTF-8u9
9 -error: W -source file is not valid UTF-8Wa
ll error: -Wanull character ignored [-Werror,-Wnull-character]ss
ignerror: -ennull character ignored [-Werror,-Wnull-character]um
 -Werror: cassource file is not valid UTF-8t-
quaerror: l -source file is not valid UTF-8Wm
isfatal error: sintoo many errors emitted, stopping now [-ferror-limit=]g-
prototypes -Wmissing-variable-dPLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
eStack dump:
c0l.	aProgram arguments: r/abtiino/ncsl a-nWgo l-dI-/sbtoyolte/-hdoemfei/ngiittiroenp o-sW/ptecdpadnutmipc/ b-uWiplodi n-tIe/rb-oaorti/thho m-eW/pgoiitnrteepro-ss/itgcnp d-uWmsph a-dioswy s-tWesmi g/nb-ocootm/psayrset e-mW/svtarri/csth-aprreodt_omteympoersy /-tWcupndduemfp _-bWuuinlrde_amcahtarbilxe.-mc2okdleU-Sr6e7t/uirnnc l-uWdues e-ds-tbdu=tg-nmua9r9k e-dW- u-nWuasleld  --WWawsrsiitgen--setnruimn g-sW c-aWsetr-rqoura l- M-DW m-iMsTs iCnMga-kperFoitloetsy/pneest d-iWsmsiescsti.ndgi-rv/acrhieacbklseu-md.ecc.loa r-aMtFi oCnMsa k-eWFoillde-ss/tnyelted-idsesfeicnti.tdiiorn/ c-hWepcekdsaunmt.icc. o-.Wdp o-ion tCeMra-kaerFiitlhe s-/Wnpeotidnitsesre-csti.gdni r-/Wcshheacdkoswu m-.Wcs.iog n--cc o/mbpoaorte/ h-oWmset/rgiicttr-epproost/ottcyppdeusm p-/Wcuhnedcekfs u-mW.ucn
r1e.	a<unknown> parser at unknown location
cclangh: aberror: le-clang frontend command failed with exit code 139 (use -v to see invocation)co
dclang version 17.0.6e
-Target: rx86_64-unknown-haikue
tThread model: uposixr
nInstalledDir:  /bin-
Wused-but-marked-unused -Wwrite-strings -Werror -MD -MT CMakeFiles/netdissect.dir/cpack.c.o -MF CMakeFiles/netdissect.dir/cpack.c.o.d -o CMakeFiles/netdissect.dir/cpack.c.o -c /boot/home/gitrepos/tcpdump/cpack.c
1.	<unknown> parser at unknown location
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 17.0.6
Target: x86_64-unknown-haiku
Thread model: posix
InstalledDir: /bin
clang: error: unable to execute command: Kill Thread
clang: note: diagnostic msg: Error generating preprocessed source(s).
make[2]: *** [CMakeFiles/netdissect.dir/cpack.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
clang: error: unable to execute command: Kill Thread
clang: note: diagnostic msg: Error generating preprocessed source(s).
make[2]: *** [CMakeFiles/netdissect.dir/checksum.c.o] Error 1
clang: error: unable to execute command: Kill Thread
clang: note: diagnostic msg: Error generating preprocessed source(s).
make[2]: *** [CMakeFiles/netdissect.dir/af.c.o] Error 1
clang: error: unable to execute command: Kill Thread
clang: note: diagnostic msg: Error generating preprocessed source(s).
make[2]: *** [CMakeFiles/netdissect.dir/addrtoname.c.o] Error 1
make[1]: *** [CMakeFiles/netdissect.dir/all] Error 2
make: *** [all] Error 2

Attachments (5)

Change History (10)

comment:1 by waddlesplash, 7 months ago

Resolution: invalid
Status: newclosed

All tickets for ported applications belong at https://github.com/haikuports/haikuports/

comment:2 by dovsienko, 7 months ago

For reference, the HaikuPorts bug report is here.

comment:3 by waddlesplash, 5 months ago

This ultimately wound up looking like it could be a bug in Haiku; a relevant change is made in hrev57908.

comment:4 by waddlesplash, 3 months ago

Resolution: invalid
Status: closedreopened

comment:5 by waddlesplash, 3 months ago

Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.