This is an archive of the discontinued LLVM Phabricator instance.

scudo: Test realloc on increasing size buffers.
ClosedPublic

Authored by pcc on May 18 2021, 1:02 PM.

Details

Summary

While developing a change to the allocator I ended up breaking
realloc on secondary allocations with increasing sizes. That didn't
cause any of the unit tests to fail, which indicated that we're
missing some test coverage here. Add a unit test for that case.

Diff Detail

Event Timeline

pcc requested review of this revision.May 18 2021, 1:02 PM
pcc created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 1:02 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
hctim accepted this revision.May 18 2021, 2:21 PM

It's funny you mention this, I think this is one of the problems that I saw in https://reviews.llvm.org/D102543#change-dE7v8cbuK8l4 (but there are other bugs also in realloc.cpp that need to be addressed as well). Is the fix already merged into the tree or yet to come?

This revision is now accepted and ready to land.May 18 2021, 2:21 PM
eugenis accepted this revision.May 18 2021, 2:31 PM
cryptoad accepted this revision.May 18 2021, 2:39 PM

Thank you Peter!

pcc added a comment.May 18 2021, 2:58 PM

It's funny you mention this, I think this is one of the problems that I saw in https://reviews.llvm.org/D102543#change-dE7v8cbuK8l4 (but there are other bugs also in realloc.cpp that need to be addressed as well). Is the fix already merged into the tree or yet to come?

I think that must be a different bug. The test that I'm adding here passes at head.

This revision was landed with ongoing or failed builds.May 18 2021, 2:59 PM
This revision was automatically updated to reflect the committed changes.