|
Message-ID: <20160526202139.GA24268@wilbur.25thandClement.com> Date: Thu, 26 May 2016 13:21:39 -0700 From: William Ahern <william@...handClement.com> To: musl@...ts.openwall.com Subject: Re: sockaddr_storage and GCC 6.1 I forgot to mention that I'm not subscribed to the list. I was able to build GCC 6.1 last night, but on my OS X desktop. My Alpine Linux development environment doesn't have the disk space. My test code manually reproduced the structure definitions. Both of the patches proposed appear to work, at least with strict aliasing disabled. Attached is the source code I used to verify. Here's the output of `make test`. == ss-darwin-no-strict-aliasing == .ss_len: 0,1 .ss_family: 1,2 .__ss_pad1: 2,8 .__ss_align: 8,16 .__ss_pad2: 16,128 .sin_family: 1,2 .sin_port: 2,4 .sin_addr: 4,8 0x7f000001 (OKAY) == ss-darwin-strict-aliasing == .ss_len: 0,1 .ss_family: 1,2 .__ss_pad1: 2,8 .__ss_align: 8,16 .__ss_pad2: 16,128 .sin_family: 1,2 .sin_port: 2,4 .sin_addr: 4,8 0x00000000 (FAIL) == ss-musl0-no-strict-aliasing == .ss_family: 0,2 .__ss_align: 8,16 .__ss_padding: 16,128 .sin_family: 0,2 .sin_port: 2,4 .sin_addr: 4,8 0x00000000 (FAIL) == ss-musl0-strict-aliasing == .ss_family: 0,2 .__ss_align: 8,16 .__ss_padding: 16,128 .sin_family: 0,2 .sin_port: 2,4 .sin_addr: 4,8 0x00000000 (FAIL) == ss-musl1-no-strict-aliasing == .ss_family: 0,2 .__ss_family_pad: 2,8 .__ss_align: 8,16 .__ss_padding: 16,128 .sin_family: 0,2 .sin_port: 2,4 .sin_addr: 4,8 0x7f000001 (OKAY) == ss-musl1-strict-aliasing == .ss_family: 0,2 .__ss_family_pad: 2,8 .__ss_align: 8,16 .__ss_padding: 16,128 .sin_family: 0,2 .sin_port: 2,4 .sin_addr: 4,8 0x00000000 (FAIL) == ss-musl2-no-strict-aliasing == .ss_family: 0,2 .__ss_padding: 2,120 .__ss_align: 120,128 .sin_family: 0,2 .sin_port: 2,4 .sin_addr: 4,8 0x7f000001 (OKAY) == ss-musl2-strict-aliasing == .ss_family: 0,2 .__ss_padding: 2,120 .__ss_align: 120,128 .sin_family: 0,2 .sin_port: 2,4 .sin_addr: 4,8 0x00000000 (FAIL) View attachment "Makefile" of type "text/plain" (995 bytes) View attachment "ss.c" of type "text/plain" (3377 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.