emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSON/YAML/TOML/etc. parsing performance


From: Eli Zaretskii
Subject: Re: JSON/YAML/TOML/etc. parsing performance
Date: Tue, 03 Oct 2017 20:10:18 +0300

> Date: Tue, 03 Oct 2017 19:26:53 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> 
> > I don't understand why you think these checks aren't necessary. Converting
> > between integral types when the number is out of range for the destination
> > type results in an implementation-defined result, i.e. it's unportable.
> 
> I'm saying that this code is the wrong place for doing these checks.
> 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.  We now
have in many places dozens of tests and tricky macros we never had
before with checks and defenses against such calamities.  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.

Paul, can you please comment on this?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]