This is an archive of the discontinued LLVM Phabricator instance.

[Scudo] Fix SizeClassAllocatorLocalCache::drain
ClosedPublic

Authored by vitalybuka on Apr 1 2021, 12:53 PM.

Details

Summary

It leaved few blocks in PerClassArray[0].

Diff Detail

Event Timeline

vitalybuka requested review of this revision.Apr 1 2021, 12:53 PM
vitalybuka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2021, 12:53 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
cryptoad accepted this revision.Apr 1 2021, 12:58 PM

Thank you, good catch, how did this show up?
1 comment nit.

compiler-rt/lib/scudo/standalone/local_cache.h
112–114

s/cat/can

This revision is now accepted and ready to land.Apr 1 2021, 12:58 PM
cryptoad added inline comments.Apr 1 2021, 1:10 PM
compiler-rt/lib/scudo/standalone/local_cache.h
113

Actually, could I please ask you to write this and not consider that the BatchClassId is 0? In other portions of the code I used a if I == BatchClassId continue and then a special case at the end. That would allow to change BatchClassId more easily if it ever came to this.

This revision was landed with ongoing or failed builds.Apr 1 2021, 1:27 PM
This revision was automatically updated to reflect the committed changes.
vitalybuka marked an inline comment as done.EditedApr 1 2021, 1:29 PM

Thank you, good catch, how did this show up?

I tried to run tests with --gtest_repeat=2. It still needs D99766