This crate is a low level unsafe raw bindings for the QuickJS JavaScript engine.
How to debug 'Assertion failed: (p->ref_count > 0), function gc_decref_child' ?
- apply patch
diff --git a/quickjs.c b/quickjs.c
index 9cac6de..562b486 100644
static void gc_decref_child(JSRuntime *rt, JSGCObjectHeader *p)
{
+ if (p->ref_count <= 0) {
+ JS_DumpGCObject(rt, p);
+ }
assert(p->ref_count > 0);
p->ref_count--;
if (p->ref_count == 0 && p->mark == 1) {
- run
DUMPFLAGS=0x200
- use address printed by JS_DumpGCObject to find which object had been freed.