From: Philipp Stephani <phst@google.com>
To: Paul Eggert <eggert@cs.ucla.edu>, Eli Zaretskii <eliz@gnu.org>,
Andreas Schwab <schwab@linux-m68k.org>
Cc: p.stephani2@gmail.com, emacs-devel@gnu.org
Subject: Re: [PATCH] Fix use of sockaddr_in
Date: Mon, 15 May 2017 09:04:56 +0000 [thread overview]
Message-ID: <CAP-RRPuHeeb5fyd8a_A2vGwiUBhZ1R3-62E9HcAHcTszqV75XA@mail.gmail.com> (raw)
In-Reply-To: <f6f3f7a4-c615-66b3-bfb7-b318c137a9f1@cs.ucla.edu>
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
Paul Eggert <eggert@cs.ucla.edu> schrieb am Mo., 15. Mai 2017 um 08:15 Uhr:
> Eli Zaretskii wrote:
> > if your
> > intent was to say that this condition should be added to the code,
> > i.e. for AF_UNIX we should not try to compute the port, then I agree.
>
> I installed a modified version of Philipp's patch, to do that. Thanks,
> Philipp,
> for tracking this down.
>
>
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d23a486ba27405acfda67a4dc387ade5e399a29b
Thanks! A few questions to guard against undefined behavior:
- Maybe add verify(INT_MAX >= TYPE_MAXIMUM(in_port_t)) and
verify(TYPE_MINIMUM(in_port_t) == 0) to make sure that we can use int for
the port?
- Should there be a guard against the alias violation, e.g. by declaring sa
and sa1 with __attribute__((may_alias))? Otherwise it's UB and the compiler
might elide the switch entirely.
--
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.
This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.
[-- Attachment #2: Type: text/html, Size: 2114 bytes --]
next prev parent reply other threads:[~2017-05-15 9:04 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 3:40 building/using address-sanitizer-enabled emacs? Jim Meyering
2017-05-07 19:54 ` Paul Eggert
2017-05-07 21:44 ` Jim Meyering
2017-05-08 2:36 ` Eli Zaretskii
2017-05-08 5:42 ` Paul Eggert
2017-05-08 14:39 ` Eli Zaretskii
2017-05-08 14:46 ` Paul Eggert
2017-05-08 16:04 ` Eli Zaretskii
2017-05-09 5:48 ` Jim Meyering
2017-05-09 15:18 ` Eli Zaretskii
2017-05-09 17:06 ` Jim Meyering
2017-05-09 17:45 ` Eli Zaretskii
2017-05-09 19:22 ` Paul Eggert
2017-05-09 22:49 ` Jim Meyering
2017-05-10 2:41 ` Eli Zaretskii
2017-05-16 21:49 ` Paul Eggert
2017-05-17 2:24 ` Eli Zaretskii
2017-05-17 14:46 ` Paul Eggert
2017-05-17 16:06 ` Eli Zaretskii
2017-05-17 20:05 ` Paul Eggert
2017-05-18 4:15 ` Eli Zaretskii
2017-05-09 23:15 ` Philipp Stephani
2017-05-10 2:42 ` Eli Zaretskii
2017-05-10 22:24 ` Philipp Stephani
2017-05-13 8:02 ` Eli Zaretskii
2017-05-13 15:08 ` [PATCH] Fix use of sockaddr_in Philipp Stephani
2017-05-13 16:52 ` Eli Zaretskii
2017-05-13 19:14 ` Andreas Schwab
2017-05-13 19:29 ` Eli Zaretskii
2017-05-13 20:05 ` Andreas Schwab
2017-05-14 2:32 ` Eli Zaretskii
2017-05-14 6:11 ` Andreas Schwab
2017-05-14 14:20 ` Eli Zaretskii
2017-05-15 6:15 ` Paul Eggert
2017-05-15 9:04 ` Philipp Stephani [this message]
2017-05-17 20:38 ` Paul Eggert
2017-05-27 11:35 ` Philipp Stephani
2017-05-17 15:16 ` Eli Zaretskii
2017-05-17 20:15 ` Paul Eggert
2017-05-14 10:28 ` Lars Ingebrigtsen
2017-05-14 19:06 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP-RRPuHeeb5fyd8a_A2vGwiUBhZ1R3-62E9HcAHcTszqV75XA@mail.gmail.com \
--to=phst@google.com \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=p.stephani2@gmail.com \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.