This is an archive of the discontinued LLVM Phabricator instance.

[UBSan] Cannot negate smallest negative signed integer
ClosedPublic

Authored by ctetreau on Nov 3 2020, 12:59 PM.

Details

Summary

Silence warning Undefined Behavior Sanitzer warning:
runtime error: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself

Diff Detail

Event Timeline

ctetreau created this revision.Nov 3 2020, 12:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2020, 12:59 PM
ctetreau requested review of this revision.Nov 3 2020, 12:59 PM
paulwalker-arm accepted this revision.Nov 4 2020, 4:06 AM
This revision is now accepted and ready to land.Nov 4 2020, 4:06 AM
This revision was landed with ongoing or failed builds.Nov 4 2020, 10:08 AM
This revision was automatically updated to reflect the committed changes.