Bug 37598 - [Qt] tst_QScriptValue::toString has a memory leak.
Summary: [Qt] tst_QScriptValue::toString has a memory leak.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Jędrzej Nowacki
URL:
Keywords: Qt
Depends on:
Blocks: 31863
  Show dependency treegraph
 
Reported: 2010-04-14 12:57 PDT by Jędrzej Nowacki
Modified: 2010-04-14 19:58 PDT (History)
4 users (show)

See Also:


Attachments
Fix v1 (1.47 KB, patch)
2010-04-14 13:36 PDT, Jędrzej Nowacki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jędrzej Nowacki 2010-04-14 12:57:28 PDT
Valgrind report a memory leak inside the QScriptValue::toString autotest. It seems that a temporary variable is not released.

==5038==    at 0x4C221A7: malloc (vg_replace_malloc.c:195)                                                                                                                                           
==5038==    by 0x50BCB38: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:249)                                                                                                                        
==5038==    by 0x50072DD: WTF::FastAllocBase::operator new(unsigned long) (FastAllocBase.h:96)                                                                                                       
==5038==    by 0x5020833: OpaqueJSString::create(unsigned short const*, unsigned int) (OpaqueJSString.h:45)                                                                                          
==5038==    by 0x5020493: JSStringCreateWithUTF8CString (JSStringRef.cpp:50)                                                                                                                         
==5038==    by 0x4FFFF34: QScriptConverter::toString(QString const&) (qscriptconverter_p.h:59)                                                                                                       
==5038==    by 0x50000C1: QScriptEnginePrivate::makeJSValue(QString const&) const (qscriptengine_p.h:112)                                                                                            
==5038==    by 0x50036C1: QScriptValuePrivate::QScriptValuePrivate(QScriptEngine const*, QString const&) (qscriptvalue_p.h:284)                                                                      
==5038==    by 0x5001CE1: QScriptValue::QScriptValue(QScriptEngine*, QString const&) (qscriptvalue.cpp:162)                                                                                          
==5038==    by 0x414952: tst_QScriptValue::initScriptValues() (tst_qscriptvalue_generated.cpp:112)                                                                                                   
==5038==    by 0x41F8CC: tst_QScriptValue::toString_initData() (tst_qscriptvalue_generated.cpp:667)                                                                                                  
==5038==    by 0x405C0E: tst_QScriptValue::dataHelper(void (tst_QScriptValue::*)(), void (tst_QScriptValue::*)(char const*)) (tst_qscriptvalue.cpp:36)
Comment 1 Jędrzej Nowacki 2010-04-14 13:36:44 PDT
Created attachment 53360 [details]
Fix v1
Comment 2 WebKit Commit Bot 2010-04-14 19:58:21 PDT
Comment on attachment 53360 [details]
Fix v1

Clearing flags on attachment: 53360

Committed r57625: <http://trac.webkit.org/changeset/57625>
Comment 3 WebKit Commit Bot 2010-04-14 19:58:26 PDT
All reviewed patches have been landed.  Closing bug.