Persistent<Function> f, gets initialized to garbage value when allocated using new.

9 views
Skip to first unread message

gayathri k

unread,
Sep 25, 2015, 3:06:13 AM9/25/15
to v8-users
Hi,

I am developing an addon for node.js using V8. 

I allocate this C structure using `new`. When I compile the addon in Release mode, the val_ structure inside Persistent<Function> is initialized to NULL. When I compile the addon in debug mode, 
the same val_ structure is initialized to garbage value. Subsequently, I try to assign a Local<Function> to this Persistent<Function>, the V8 code tries to free up the existing val_, which is some garbage. 
This crashes the addon module in debug mode. I would like understand the difference in behavior for release and debug mode compilation. And the reason behind val_ getting initialized to garbage value.

Thanks

Reply all
Reply to author
Forward
0 new messages