() Paul Eggert <[email protected]> () Sun, 31 Aug 2014 19:23:53 -0700
The recent change [...] introduced a bug because 'tmp + width'
has undefined behavior if the resulting pointer would fall
outside the containing buffer (this is true even though the
pointer is not dereferenced).
I believe the C11 spec describes this behavior in §6.5.6 ¶8,
"Additive Operators" (in my draft copy, at least). Is that
correct? Anywhere else i should look to learn more?
[...] better to use -Wno-sign-compare, as the signal-to-noise
ratio with -Wsign-compare is too high, and it's too tempting to
introduce bugs such as this one.
Yes, i surely fell for it.
That being said, I worked around this problem with the attached
further patch, which fixes somewhat-related issues that I also
noticed.
Thanks.
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
signature.asc
Description: PGP signature
