Skip to content

src: return static buffer on malloc(0)

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)
  • src
Description of change

This is an alternate approach to https://github.com/nodejs/node/pull/8572 that reuses a static buffer for malloc(0) requests to restore pre-node v6.6.0 behavior. This requires the addition of a new node::Free() for all buffers created via node::Malloc()/node::Calloc().

Fixes: https://github.com/nodejs/node/issues/8571

Merge request reports

Loading