bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#49261: Segfault during loadup


From: Eli Zaretskii
Subject: bug#49261: Segfault during loadup
Date: Thu, 15 Jul 2021 09:13:59 +0300

> Cc: larsi@gnus.org, 49261@debbugs.gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 14 Jul 2021 17:24:37 -0500
> 
> I originally wrote it as "uintptr_t mask = VALMASK;" because I would 
> rather avoid C casts when possible (they're too powerful and allow too 
> many bugs to go undetected). I dislike the workaround that I installed 
> because of (a) its unnecessary cast and (b) the lack of clarity that 
> it's intended that we want to discard any bits outside UINTPTR_MAX ((b) 
> was a problem with my original code too).
> 
> To try to fix both (a) and (b) I installed the attached further patch. 
> It is a bit more verbose than what C requires, but the verbosity should 
> help explain that masking with UINTPTR_MAX is intended, and the 
> verbosity shouldn't hurt efficiency.

Thanks, I think this new code is much cleaner and less mysterious.





reply via email to

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