[Webkit-unassigned] [Bug 49749] [Qt] plugins/refcount-leaks.html fails, wrong ref count of npobject

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 11 12:14:59 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=49749





--- Comment #5 from Oliver Hunt <oliver at apple.com>  2011-05-11 12:14:58 PST ---
Compiler will optimise usage of the stack differently between release and debug builds, and gc is dependent on values it finds in the stack.  Simple scenario:


JSCell* c = someGCValue;
c->doSomethingCool();
JSCell* c2 = someOtherGCValue;
c2->doSomethingCool();
doAFullGC();

In a debug build a compiler is almost certainly going to have a stackframe set up along the lines of:

<-->
slot for c
slot for c2
<-->

In a release build it will see that after c->doSomethingCool(), c is never used so will generate a frame akin to:
<-->
slot for c or c2
<-->

In a debug build the gc will therefore see references to two values on the stack and keep them both alive, whereas in the release build there will be only one, so that the value originally held by c my become dead, and so be collected.

This is the most obvious way that debug vs. release differences can influence gc

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list