This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Fix CHECK implementation
ClosedPublic

Authored by vitalybuka on May 24 2021, 6:17 PM.

Details

Summary

Cast of signed types to u64 breaks comparison.
Also remove double () around operands.

Diff Detail

Event Timeline

vitalybuka requested review of this revision.May 24 2021, 6:17 PM
vitalybuka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2021, 6:17 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
cryptoad accepted this revision.May 25 2021, 7:55 AM

Right, that makes sense, thank you Vitaly!
FWIW, this was originally taken from CHECK_IMPL in sanitizer_common that seems to display the same behavior: https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h#L289

This revision is now accepted and ready to land.May 25 2021, 7:55 AM
hctim accepted this revision.May 25 2021, 8:37 AM

LGTM

This revision was landed with ongoing or failed builds.May 25 2021, 10:56 AM
This revision was automatically updated to reflect the committed changes.