Skip to content
Commit aa18ae86 authored by Nico Weber's avatar Nico Weber
Browse files

llvm-undname: Tweak arena allocator

- 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.

Differential Revision: https://reviews.llvm.org/D60774

llvm-svn: 358489
parent 5961b020
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment