Closed Bug 293002 Opened 20 years ago Closed 12 years ago

Possible leak in JS_ResolveStandardClass

Categories

(Core :: JavaScript Engine, defect)

1.7 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: vda, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050505 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050505 Firefox/1.0.3

valgrind log:

==11613== 4028 (3108 direct, 920 indirect) bytes in 35 blocks are definitely
lost in loss record 242 of 273
==11613==    at 0x34146CCE: realloc (vg_replace_malloc.c:196)
==11613==    by 0x3415D3DE: JS_realloc (in $src/libmozjs.so)
==11613==    by 0x3419ECB8: js_AllocSlot (in $src/libmozjs.so)
==11613==    by 0x341BC22C: js_AddScopeProperty (in $src/libmozjs.so)
==11613==    by 0x3419F40A: js_DefineNativeProperty (in $src/libmozjs.so)
==11613==    by 0x3419F1A6: js_DefineProperty (in $src/libmozjs.so)
==11613==    by 0x341A2B36: js_SetClassPrototype (in $src/libmozjs.so)
==11613==    by 0x3415DC87: JS_InitClass (in $src/libmozjs.so)
==11613==    by 0x3418227C: js_InitFunctionClass (in $src/libmozjs.so)
==11613==    by 0x3415CB6F: (within $src/libmozjs.so)
==11613==    by 0x3415D191: JS_ResolveStandardClass (in $src/libmozjs.so)
==11613==    by 0x35B0D7D2: (within $src/components/libgklayout.so)

JS_ResolveStandardClass(...) {
...
#if JS_HAS_UNDEFINED
    /* See if we're resolving 'undefined', and define it if so. */
    atom = rt->atomState.typeAtoms[JSTYPE_VOID];
    if (idstr == ATOM_TO_STRING(atom)) {
        *resolved = JS_TRUE;
        return OBJ_DEFINE_PROPERTY(cx, obj, (jsid)atom, JSVAL_VOID, NULL, NULL,
                                   JSPROP_PERMANENT, NULL);
    }
#endif

I think it gets allocated in OBJ_DEFINE_PROPERTY above.
I do not know from where JS_ResolveStandardClass is called.
It might be js.c::global_resolve()

So far I don't know precisely where does it leak these
allocated objects.

Reproducible: Always

Steps to Reproduce:
Version: unspecified → 1.0 Branch
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Status: RESOLVED → UNCONFIRMED
Component: General → JavaScript Engine
Product: Firefox → Core
Resolution: EXPIRED → ---
Version: 1.0 Branch → 1.7 Branch
Assignee: nobody → general
QA Contact: general → general
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.