WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105891
Objective-C API: Use of ObjC associated object API is wrong, causing leaks
https://bugs.webkit.org/show_bug.cgi?id=105891
Summary
Objective-C API: Use of ObjC associated object API is wrong, causing leaks
Gavin Barraclough
Reported
2012-12-31 23:43:12 PST
Initial implementation adds an associated object for each JSContext to all wrapped instances. It may be better to (1) only add one associated object and (2) not add associated objects to immortal instances.
Attachments
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2013-01-03 15:26:08 PST
There are two problems here: (1) Associated objects grow without bound for each JSContext an object is used in (2) For ObjC globals, this is an error, which causes console spew
Geoffrey Garen
Comment 2
2013-01-03 15:31:12 PST
Example console spew: testapi(88881,0x7fff7773c340) malloc: *** auto malloc[88881]: error for object 0x7fff5c2722a0: auto_zone_set_associative_ref: object should point to a GC block or a global address, otherwise associations will leak. Break on auto_zone_association_error() to debug.
Mark Hahnenberg
Comment 3
2013-01-11 12:59:49 PST
Fixed in
bug 106056
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug