From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> Date: Tue, 03 Oct 2017 19:26:53 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-dev= el@gnu.org
>
> > I don't understand why you think these checks aren't nece= ssary. Converting
> > between integral types when the number is out of range for the de= stination
> > type results in an implementation-defined result, i.e. it's u= nportable.
>
> I'm saying that this code is the wrong place for doing these check= s.
> We can discuss whether these checks are needed in general, and if we > agree they are, we should change all the related allocation
> subroutines to do that there.
Let me say this another way: Paul Eggert and others have spent the
last several years hardening Emacs primitives for all kinds of
infrequent situations where we could have undefined behavior.=C2=A0 We now<= br> have in many places dozens of tests and tricky macros we never had
before with checks and defenses against such calamities.=C2=A0 If, after
all that, we still need application-level C code to do its own checks
for such situations, then I don't understand what we were doing all
these years, and why all the safety nets we added are not good enough
for taking care of this code as well.