This is an archive of the discontinued LLVM Phabricator instance.

llvm-undname: Tweak arena allocator
ClosedPublic

Authored by thakis on Apr 16 2019, 6:42 AM.

Details

Summary
  • Make allocUnalignedBuffer look more like allocArray and alloc. No behavior change.
  • Change Head->Used < Head->Capacity to Head->Used <= Head->Capacity in allocArray and alloc. No intended behavior change, might be a minuscule memory usage improvement. Noticed this since it was the logic used in allocUnalignedBuffer.
  • Don't let allocArray alloc too small buffers for names that have more than 512 levels of nesting (in 64-bit builds). Fixes a heap buffer overflow found by oss-fuzz.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Apr 16 2019, 6:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 16 2019, 6:42 AM
hans accepted this revision.Apr 16 2019, 6:47 AM

lgtm

This revision is now accepted and ready to land.Apr 16 2019, 6:47 AM
This revision was automatically updated to reflect the committed changes.