Page MenuHomePhabricator

[ASan/Win] Fix failing test after ce44fe199bbf
AbandonedPublic

Authored by chrish_ericsson_atx on Fri, Jun 11, 11:58 AM.

Details

Reviewers
aaron.ballman
rnk
Summary

Test includes array access with computed index of -3,
which is unreasonable. New diagnostic warning introduced
by commit ce44fe199bbf catches this at compile time.
Since this test is compiled with -Werror, the new diagnostic
causes a build failure for this test. Fixed by inserting
pragmas to ignore the warning. Perhaps there is a more
sensible way for this test to be constructed such that the
index won't be utter nonsense, but as I'm not familiar with
the intent of this test, it seemed safe to just dodge the
diagnostic for the one line of code that triggers it.

Diff Detail

Event Timeline

chrish_ericsson_atx requested review of this revision.Fri, Jun 11, 11:58 AM
chrish_ericsson_atx created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFri, Jun 11, 11:58 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Note -- I do not have appropriate resources configured to test this patch. If this patch fails pre-commit tests, I'd be grateful if someone who is already set up for Windows-based development could make any corrections needed here.

timurrrr edited reviewers, added: rnk; removed: timurrrr.Fri, Jun 11, 1:16 PM
rnk added a comment.Fri, Jun 11, 3:54 PM

IMO it would be more resiliant to hide the index or the pointer from the compiler, let me try to put together that fix.

rnk added a comment.Fri, Jun 11, 4:28 PM

I fixed it and it went green, thanks for the fix and the heads up though:
https://lab.llvm.org/buildbot/#/builders/127/builds/12308

Abandoning change, as @mk addressed this by hiding the index expression from the compiler (commit rGb9af157fd18d).