This is an archive of the discontinued LLVM Phabricator instance.

[libc] fix strtointeger behavior on max values
ClosedPublic

Authored by michaelrj on Mar 29 2023, 10:47 AM.

Details

Summary

Previously the check to just return MAX or MIN used the caclulated
number being the maximum absolute value. This was right in every case
except for an unsigned conversion being passed its maximum value with a
negative sign on the front. This should return -MAX, but was returning
just MAX.

Diff Detail

Event Timeline

michaelrj created this revision.Mar 29 2023, 10:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 29 2023, 10:47 AM
michaelrj requested review of this revision.Mar 29 2023, 10:47 AM
lntue accepted this revision.Mar 29 2023, 12:32 PM
This revision is now accepted and ready to land.Mar 29 2023, 12:32 PM
This revision was automatically updated to reflect the committed changes.