'use strict';
const ref = require("./build/Release/binding.node");
const buf = Buffer.alloc(64, 1);
ref.readObject(buf, 0);
leads to
segmentation fault (core dumped) node repro.js
The problem is that the buffer contents are interpreted as references to object heaps before writing any reference to an object into the buffer.
leads to
The problem is that the buffer contents are interpreted as references to object heaps before writing any reference to an object into the buffer.