[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suspicious warning in W64 build
From: |
Eli Zaretskii |
Subject: |
Re: Suspicious warning in W64 build |
Date: |
Thu, 07 Sep 2017 23:20:51 +0300 |
> Cc: address@hidden, address@hidden
> From: Paul Eggert <address@hidden>
> Date: Thu, 7 Sep 2017 12:26:06 -0700
>
> > Yes, I know. I just don't understand why GCC things that
> >
> > nglyphs * sizeof (WORD) * 2
> >
> > can have a value in this range. The type of nglyphs is 'int', and
> > sizeof(WORD) gives 2. So the range should be between 0 (or 4) and 4
> > times INT_MAX, which is nowhere near the values GCC displays.
> >
>
> If nglyphs is negative the first multiplication is done using unsigned
> arithmetic, which could result in huge results. Presumably GCC does not know
> that nglyphs must be nonnegative. Try putting an 'eassume (0 <= nglyphs);'
> before the line in question. That is, if you're sure that nglyphs is
> nonnegative: if you're not, GCC has found a real bug here.
nglyphs is always positive, it comes from nchars of a glyph_string, or
similar.
Angelo and Richard, can you please try that eassume and see if it
shuts up the warning?
- Re: Suspicious warning in W64 build, (continued)
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/09
- Re: Suspicious warning in W64 build, Angelo Graziosi, 2017/09/09
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/10
- Re: Suspicious warning in W64 build, Angelo Graziosi, 2017/09/10
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/10
- Re: Suspicious warning in W64 build, Angelo Graziosi, 2017/09/10
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/10
- Re: Suspicious warning in W64 build, Angelo Graziosi, 2017/09/09
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/09
- Re: Suspicious warning in W64 build, Fabrice Popineau, 2017/09/09
- Re: Suspicious warning in W64 build,
Eli Zaretskii <=
- Re: Suspicious warning in W64 build, Angelo Graziosi, 2017/09/07
- Re: Suspicious warning in W64 build, Eli Zaretskii, 2017/09/08