GNU bug report logs -
#50767
28.0.50; Warnings about snprintf in image.c on armv7l
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Thu, 23 Sep 2021 17:05:01 UTC
Severity: minor
Tags: moreinfo, patch
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 50767 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii [2021-09-24 09:41 +0300] wrote:
>> Date: Thu, 23 Sep 2021 23:49:37 +0100
>> From: Alan Third <alan <at> idiocy.org>
>> Cc: 50767 <at> debbugs.gnu.org
>>
>> > >> What if xmalloc or snprintf fail?
>> > >
>> > > Doesn't xmalloc causes some sort of error to occur? I'm not sure.
>> >
>> > I think it exits only while Emacs is still initialising itself before
>> > entering the top-level command loop, and otherwise frees ballast memory
>> > and signals a Lisp error.
>> >
>> > At least the second snprintf in svg_load_image does check xmalloc's
>> > return value.
>>
>> None of the other uses of xmalloc in image.c check the return value
>> either, as far as I can see, and I certainly didn't write them all...
>
> AFAIR, there's no need to check the return value of xmalloc, because
> it doesn't return if it cannot allocate memory.
Are you thinking about xalloc? If not, could you please point me to the
part of xmalloc that doesn't return (except for the !initialized branch
in memory_full)? I'm afraid I couldn't spot it.
--
Basil
This bug report was last modified 3 years and 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.