GNU bug report logs -
#18995
Error: Could not reserve dynamic heap area.
Previous Next
Full log
Message #58 received at 18995 <at> debbugs.gnu.org (full text, mbox):
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: eliz <at> gnu.org, haroogan <at> gmail.com
> Date: Sun, 09 Nov 2014 17:30:21 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Given that, it is justified for GCC to give us what we deserve, i.e. a
> > loop "unrolled" by executing its body only once. I present the
> > disassembly below, for the curious, and it's clear that there's no
> > loop there, and also the value of 'size' is never tested at all, since
> > GCC decided that the condition 'size > 0x00100000' is always true.
>
> But if you replace 'size > 0x00100000' with true, you get a loop that is
> conditionalized by '!ptr', which depends on the execution of the loop
> body. Why would it be correct to execute the loop only once,
> unconditionally?
Feel free to report this as a GCC bug, if you think that's what it is.
All I can tell is that the same behavior is present in 3 different GCC
releases from 3 different major versions.
In any case, I think the original code had a subtle bug, in that the
comparison of 'size' didn't do what the author intended.
This bug report was last modified 10 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.