This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Test ScudoReleaseTest.BufferPool with a buffer pool allocated on the heap
ClosedPublic

Authored by fabio-d on Mar 16 2023, 8:50 AM.

Details

Summary

The previous code resulted in 252 KiB being allocated on the stack,
which caused a stack overflow on Fuchsia.

Diff Detail

Event Timeline

fabio-d created this revision.Mar 16 2023, 8:50 AM
fabio-d requested review of this revision.Mar 16 2023, 8:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2023, 8:50 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
fabio-d updated this revision to Diff 505867.Mar 16 2023, 10:29 AM
fabio-d retitled this revision from [scudo] Test ScudoReleaseTest.BufferPool with a smaller buffer size to [scudo] Test ScudoReleaseTest.BufferPool with a buffer pool allocated on the heap.
fabio-d edited the summary of this revision. (Show Details)

As discussed offline with @Chia-hungDuan, moved the buffer pool to the heap instead of simply allocating less on the stack.

Chia-hungDuan accepted this revision.Mar 16 2023, 10:31 AM

LGTM

compiler-rt/lib/scudo/standalone/tests/release_test.cpp
570

Can we have some comment here to say why we have to allocate the buffer on heap?

This revision is now accepted and ready to land.Mar 16 2023, 10:31 AM
fabio-d updated this revision to Diff 505873.Mar 16 2023, 10:44 AM
fabio-d marked an inline comment as done.Mar 16 2023, 10:47 AM
fabio-d added inline comments.
compiler-rt/lib/scudo/standalone/tests/release_test.cpp
570

Done, thanks!

This revision was landed with ongoing or failed builds.Mar 16 2023, 11:14 AM
This revision was automatically updated to reflect the committed changes.