This is an archive of the discontinued LLVM Phabricator instance.

Fix ASTReader invalid bounds check
AbandonedPublic

Authored by christylee on Mar 6 2019, 2:05 PM.

Details

Reviewers
tks2103
modocache
Summary

The ASTReader does the index bounds check before incrementing the index, so Clang :: Modules/module_file_info.m failed on include/llvm/ADT/SmallVector.h:153 assert(idx < size()). This fixes the bounds check by incrementing first.

Diff Detail

Event Timeline

christylee created this revision.Mar 6 2019, 2:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2019, 2:05 PM
smeenai added a subscriber: smeenai.Mar 6 2019, 2:13 PM

Is there any way to add a test for this, to prevent future regressions?

include/llvm/ADT/SmallVector.h:153 has an assert statement, but I'm not sure why I'm the only one who's experienced problems so far.

christylee abandoned this revision.Mar 11 2019, 10:12 AM