[webkit-reviews] review granted: [Bug 223614] wtf/text/IntegerToStringConversion.h:54:104: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself : [Attachment 424020] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 23 09:01:34 PDT 2021


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 223614: wtf/text/IntegerToStringConversion.h:54:104: runtime error:
negation of -2147483648 cannot be represented in type 'int'; cast to an
unsigned type to negate this value to itself
https://bugs.webkit.org/show_bug.cgi?id=223614

Attachment 424020: Patch

https://bugs.webkit.org/attachment.cgi?id=424020&action=review




--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 424020
  --> https://bugs.webkit.org/attachment.cgi?id=424020
Patch

I understand how this quiets the undefined behavior sanitizer, but I am sort of
surprised that this actually avoids undefined behavior. I am surprised that the
unary minus operation is defined so usefully on unsigned types.


More information about the webkit-reviews mailing list