Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment warning in logpkt.c CHKSUM_ADD_RANGE [-Waddress-of-packed-member] #256

Open
letoams opened this issue Aug 30, 2019 · 2 comments
Open

Comments

@letoams
Copy link

letoams commented Aug 30, 2019

logpkt.c: In function 'logpkt_pcap_build':
logpkt.c:351:3: warning: converting a packed 'ip4_hdr_t' {aka 'struct <anonymous>'} pointer (alignment 1) to a 'uint16_t' {aka 'short unsigned int'} pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member]
  351 |   CHKSUM_ADD_RANGE(sum, ip4_hdr, sizeof(ip4_hdr_t));
      |   ^~~~~~~~~~~~~~~~
logpkt.c:81:9: note: defined here
   81 | typedef struct __attribute__((packed)) {
      |         ^~~~~~
logpkt.c:399:2: warning: converting a packed 'tcp_hdr_t' {aka 'struct <anonymous>'} pointer (alignment 1) to a 'uint16_t' {aka 'short unsigned int'} pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member]
  399 |  CHKSUM_ADD_RANGE(sum, tcp_hdr, sizeof(tcp_hdr_t) + payloadlen);
      |  ^~~~~~~~~~~~~~~~
logpkt.c:103:9: note: defined here
  103 | typedef struct __attribute__((packed)) {
      |         ^~~~~~

For build problems, please supply:

  • Output of uname -a
Linux thinkpad.nohats.ca 5.2.9-200.fc30.x86_64 #1 SMP Fri Aug 16 21:37:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Full output of failed make including the header
------------------------------------------------------------------------------
SSLsplit 0.5.5
------------------------------------------------------------------------------
Report bugs at https://github.com/droe/sslsplit/issues/new
Please supply this header for diagnostics when reporting build issues
Before reporting bugs, make sure to try the latest develop branch first:
% git clone -b develop https://github.com/droe/sslsplit.git
------------------------------------------------------------------------------
Via pkg-config: openssl libevent libevent_openssl libevent_pthreads libpcap check
LIBNET_BASE:    /usr
Build options:  -DHAVE_NETFILTER
Build info:     V:FILE HDIFF:0 N:83c4edf
uname -a:       Linux thinkpad.nohats.ca 5.2.9-200.fc30.x86_64 #1 SMP Fri Aug 16 21:37:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
------------------------------------------------------------------------------
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cachemgr.o cachemgr.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o logbuf.o logbuf.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cert.o cert.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o log.o log.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cachefkcrt.o cachefkcrt.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o opts.o opts.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o sys.o sys.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o thrqueue.o thrqueue.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o proc.o proc.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cachetgcrt.o cachetgcrt.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -D"BUILD_PKGNAME=\"sslsplit\"" -D"BUILD_VERSION=\"0.5.5\"" -D"BUILD_DATE=\"2019-08-30\"" -D"BUILD_INFO=\"V:FILE HDIFF:0 N:83c4edf\"" -D"BUILD_FEATURES=\"-DHAVE_NETFILTER\"" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o build.o build.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o privsep.o privsep.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o url.o url.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o base64.o base64.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o nat.o nat.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cachedsess.o cachedsess.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o main.o main.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o logpkt.o logpkt.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o util.o util.c
logpkt.c: In function 'logpkt_pcap_build':
logpkt.c:351:3: warning: converting a packed 'ip4_hdr_t' {aka 'struct <anonymous>'} pointer (alignment 1) to a 'uint16_t' {aka 'short unsigned int'} pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member]
  351 |   CHKSUM_ADD_RANGE(sum, ip4_hdr, sizeof(ip4_hdr_t));
      |   ^~~~~~~~~~~~~~~~
logpkt.c:81:9: note: defined here
   81 | typedef struct __attribute__((packed)) {
      |         ^~~~~~
logpkt.c:399:2: warning: converting a packed 'tcp_hdr_t' {aka 'struct <anonymous>'} pointer (alignment 1) to a 'uint16_t' {aka 'short unsigned int'} pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member]
  399 |  CHKSUM_ADD_RANGE(sum, tcp_hdr, sizeof(tcp_hdr_t) + payloadlen);
      |  ^~~~~~~~~~~~~~~~
logpkt.c:103:9: note: defined here
  103 | typedef struct __attribute__((packed)) {
      |         ^~~~~~
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cache.o cache.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o pxyconn.o pxyconn.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o proxy.o proxy.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o logger.o logger.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o dynbuf.o dynbuf.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o ssl.o ssl.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o pxythrmgr.o pxythrmgr.c
cc -c -isystem/usr/include  -D_GNU_SOURCE -D"PKGLABEL=\"SSLsplit\"" -DHAVE_NETFILTER -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread  -std=c99 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all -pthread -o cachessess.o cachessess.c
sed -e 's,/usr/local/etc/sslsplit,/usr/local/etc/sslsplit,' -e 's,@@VERSION@@,0.5.5,' -e 's,@@DATE@@,2019-08-30,' <sslsplit.conf.in >sslsplit.conf
sed -e 's,/usr/local/etc/sslsplit,/usr/local/etc/sslsplit,' -e 's,@@VERSION@@,0.5.5,' -e 's,@@DATE@@,2019-08-30,' <sslsplit.1.in >sslsplit.1
sed -e 's,/usr/local/etc/sslsplit,/usr/local/etc/sslsplit,' -e 's,@@VERSION@@,0.5.5,' -e 's,@@DATE@@,2019-08-30,' <sslsplit.conf.5.in >sslsplit.conf.5
cc -L/usr/lib  -pthread -o sslsplit cachemgr.o logbuf.o cert.o log.o cachefkcrt.o opts.o sys.o thrqueue.o proc.o cachetgcrt.o build.o privsep.o url.o base64.o nat.o cachedsess.o main.o logpkt.o util.o cache.o pxyconn.o proxy.o logger.o dynbuf.o ssl.o pxythrmgr.o cachessess.o -lnet -lssl -lcrypto -levent_openssl -levent_pthreads -levent -lpcap 
  • Version and origin of OpenSSL used

openssl-1.1.1c-2.fc30.x86_64

  • Version and origin of libevent used

libevent-2.1.8-5.fc30.x86_64

@droe droe changed the title alignment warning Alignment warning in logpkt.c CHKSUM_ADD_RANGE [-Waddress-of-packed-member] Sep 2, 2019
@sonertari
Copy link
Collaborator

Yes, I can confirm this issue on Kali Linux 2019.3, which uses gcc 9.2.1 on kernel 5.2 too (I assume this issue is due to gcc). Removing the packed attribute on lines 81 and 103 in logpkt.c fixes it, but I think Daniel should decide on the correct fix.

@sonertari
Copy link
Collaborator

Btw, adding aligned(2) attribute along with packed also silences this warning. But I don't think that's the correct fix either. The discussion here explains the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants