dissectors/file-pcapng.c:1599:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’
Summary
Cannot compile wireshark 3.5.0 on aarch64 due to clobbing error.
Steps to reproduce
This is with libpcap from http://www.tcpdump.org/release/libpcap-1.10.1.tar.gz and sha256: ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4.
What is the current bug behavior?
[254/2488] Building C object epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o
FAILED: epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o
/usr/bin/cc -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DWS_BUILD_DLL -I. -isystem /usr/include/glib-2.0 -isystem /usr/lib/aarch64-linux-gnu/glib-2.0/include -isystem /usr/include/libxml2 -isystem epan/dissectors -isystem epan -fvisibility=hidden -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wframe-larger-than=32768 -fdiagnostics-color=always -Wunused-const-variable -Wshadow -Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wjump-misses-init -Werror=implicit -Wno-pointer-sign -std=gnu99 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fmacro-prefix-map=/run/build/wireshark/= -fmacro-prefix-map=/run/build/wireshark/= -O2 -g -DNDEBUG -fPIC -Werror -MD -MT epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o -MF epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o.d -o epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o -c epan/dissectors/file-pcapng.c
epan/dissectors/file-pcapng.c: In function ‘dissect_spb_data’:
epan/dissectors/file-pcapng.c:1599:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
1599 | int offset = 0;
| ^~~~~~
epan/dissectors/file-pcapng.c: In function ‘dissect_epb_data’:
epan/dissectors/file-pcapng.c:1791:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
1791 | int offset = 0;
| ^~~~~~
epan/dissectors/file-pcapng.c: In function ‘dissect_pb_data’:
epan/dissectors/file-pcapng.c:1541:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
1541 | int offset = 0;
| ^~~~~~
cc1: all warnings being treated as errors
[255/2488] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-autosar-nm.c.o
[256/2488] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-bblog.c.o
What is the expected correct behavior?
I expected it to compile fine, just as it does for x86_64.
https://github.com/flathub/org.wireshark.Wireshark/pull/64
Relevant logs and/or screenshots
-- C-Flags: -fvisibility=hidden -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wframe-larger-than=32768 -fdiagnostics-color=always -Wunused-const-variable -Wshadow -Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wjump-misses-init -Werror=implicit -Wno-pointer-sign -std=gnu99 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fmacro-prefix-map=/run/build/wireshark/= -fmacro-prefix-map=/run/build/wireshark/= -O2 -g -DNDEBUG
-- CXX-Flags: -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wframe-larger-than=32768 -fdiagnostics-color=always -Wextra-semi -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fmacro-prefix-map=/run/build/wireshark/= -fmacro-prefix-map=/run/build/wireshark/= -O2 -g -DNDEBUG
-- Warnings as errors enabled: -Werror
-- The following OPTIONAL packages have been found:
* Git
* GMODULE2
* Gettext
* LIBSSH (required version >= 0.6), Library for implementing SSH clients, <https://www.libssh.org/>
extcap remote SSH interfaces (sshdump, ciscodump)
* PCAP
* Systemd, System and Service Manager (libraries), <https://freedesktop.org/wiki/Software/systemd/>
Support for systemd journal extcap interface (sdjournal)
* MaxMindDB, C library for the MaxMind DB file format, <https://github.com/maxmind/libmaxminddb>
Support for GeoIP lookup
* GNUTLS (required version >= 3.3.0)
* KERBEROS
* ZLIB
* BROTLI
* LZ4, LZ4 is lossless compression algorithm used in some protocol (CQL...), <http://www.lz4.org>
LZ4 decompression in CQL and Kafka dissectors
* SNAPPY, A fast compressor/decompressor from Google, <https://google.github.io/snappy/>
Snappy decompression in CQL and Kafka dissectors
* ZSTD (required version >= 1.0.0), A compressor/decompressor from Facebook providing better compression than Snappy at a cost of speed, <https://facebook.github.io/zstd/>
Zstd decompression in Kafka dissector
* NGHTTP2, HTTP/2 C library and tools, <https://nghttp2.org>
Header decompression in HTTP2
* SBC, Bluetooth low-complexity, subband codec (SBC) decoder, <https://git.kernel.org/pub/scm/bluetooth/sbc.git>
Support for playing SBC codec in RTP player
* SPANDSP, a library of many DSP functions for telephony, <https://www.soft-switch.org>
Support for G.722 and G.726 codecs in RTP player
* BCG729, G.729 decoder, <https://www.linphone.org/technical-corner/bcg729>
Support for G.729 codec in RTP player
* ILBC, iLBC decoder, <https://github.com/TimothyGu/libilbc>
Support for iLBC codec in RTP player
* OPUS, opus decoder, <https://opus-codec.org/>
Support for opus codec in RTP player
* LibXml2
* CAP, The Libcap package implements the user-space interfaces to the POSIX 1003.1e capabilities available in Linux kernels, <https://sites.google.com/site/fullycapable/>
Allow packet captures without running as root
* SETCAP
* DOXYGEN
* SpeexDSP, SpeexDSP is a patent-free, Open Source/Free Software DSP library, <https://www.speex.org/>
RTP audio resampling
* XSLTPROC
-- The following REQUIRED packages have been found:
* GLIB2 (required version >= 2.38.0)
* GTHREAD2
* GCRYPT (required version >= 1.5.0)
* CARES (required version >= 1.5.0), Library for asynchronous DNS requests, <https://c-ares.haxx.se/>
DNS name resolution for captures
* LEX
* Perl
* Python3 (required version >= 3.4)
* M
* Qt5Core
* Qt5LinguistTools
* Qt5Network (required version >= 5.15.3)
* Qt5Gui (required version >= 5.15.3)
* Qt5Multimedia
* Qt5PrintSupport
* Qt5Widgets
* POD
-- The following OPTIONAL packages have not been found:
* SMI, Library to access SMI management information, <https://www.ibr.cs.tu-bs.de/projects/libsmi/>
Support MIB and PIB parsing and OID resolution
* Minizip, C library for supporting zip/unzip functionality, <https://www.winimage.com/zLibDll/minizip.html>
Support for profiles import/export
* LUA (required version >= 5.1)
* NL, Libraries for using the Netlink protocol on Linux, <https://www.infradead.org/~tgr/libnl/>
Support for managing wireless 802.11 interfaces
* Asciidoctor (required version >= 1.5)
-- Configuring done
-- Generating done
-- Build files have been written to: /run/build/wireshark```