puerts / backend-quickjs

BSD 3-Clause "New" or "Revised" License
14 stars 11 forks source link

fix get from empty persistent cause sigabrt or badaccess #11

Closed zombieyang closed 3 months ago

zombieyang commented 3 months ago
  1. 对IsEmpty的PersistentBase进行Get,得到的Local变量IsEmpty应为true实为false,此行为和v8不一致。
  2. Get操作所得到的Local会进入ContextScope,且在Scope销毁时会尝试对该Local的JSValue进行Free操作。而这个JSValue是一个没有初始化的结构体。因此概率性会导致crash。