GNU bug report logs -
#49261
28.0.50; File Locking Breaks Presumptuous Toolchains
Previous Next
Reported by: Mallchad Skeghyeph <ncaprisunfan <at> gmail.com>
Date: Mon, 28 Jun 2021 18:28:02 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #230 received at 49261 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 7/11/21 8:25 AM, Eli Zaretskii wrote:
>> lisp.h:251:18: warning: unsigned conversion from 'long long int' to 'uintptr_t' {aka 'unsigned int'} changes value from '2305843009213693951' to '4294967295' [-Woverflow]
>> 251 | # define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
>> | ^
>> alloc.c:4767:24: note: in expansion of macro 'VALMASK'
>> 4767 | uintptr_t mask = VALMASK;
>> | ^~~~~~~
> I tried to fix this on master, please take a look.
Yes that GCC warning was bogus, and your pacification of GCC is valid
now that we no longer tag the MSB of pointers. Still, there should be a
simpler way to pacify GCC so I installed a further fix that I hope does
that (see first attached patch). This fix simply uses a cast (uintptr_t)
VALMASK to pacify GCC; if GCC issues a bogus warning even for that cast,
we could substitute (uintptr_t) (VALMASK & UINTPTR_MAX) though this is
starting to get a little ridiculous.
The version of GCC that I tried (11.1.1 20210531 (Red Hat 11.1.1-3))
don't warn about the original code, so perhaps the bogus warning that
you saw is a GCC bug that's been fixed in later GCC versions. However,
GCC 11.1.1 does warn about some other stuff so I installed the remaining
patches to pacify it. Some of these patches fix real (albeit unlikely)
bugs in Emacs. Some work around what are evidently flaws in GCC 11.1.1.
Oh well.
[0001-Pacify-gcc-Woverflow-more-nicely.patch (text/x-patch, attachment)]
[0002-Pacify-gcc-11.1.1-Wanalyzer-null-argument.patch (text/x-patch, attachment)]
[0003-Pacify-gcc-11.1.1-Wanalyzer-possible-null-dereferenc.patch (text/x-patch, attachment)]
[0004-Pacify-gcc-11.1.1-Wclobbered.patch (text/x-patch, attachment)]
[0005-Port-test-module-to-glibc-2.33.patch (text/x-patch, attachment)]
This bug report was last modified 3 years and 306 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.