WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 32614
[Qt] Memory leak detected in ThreadingQt
https://bugs.webkit.org/show_bug.cgi?id=32614
Summary
[Qt] Memory leak detected in ThreadingQt
Chang Shu
Reported
2009-12-16 09:20:30 PST
a new instance of ThreadPriviate is created in function createThreadInternal() (ThreadingQt.cpp), but no place takes care of the deletion. See code below. ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*) { ThreadPrivate* thread = new ThreadPrivate(entryPoint, data); ...
Attachments
fix patch
(1.08 KB, patch)
2009-12-20 08:03 PST
,
Chang Shu
no flags
Details
Formatted Diff
Diff
fix patch to take care both synchronous and asynchronous mode
(1.42 KB, patch)
2009-12-23 13:59 PST
,
Chang Shu
no flags
Details
Formatted Diff
Diff
fix crash in patch 2
(2.11 KB, patch)
2009-12-28 10:54 PST
,
Chang Shu
no flags
Details
Formatted Diff
Diff
fix style check
(2.10 KB, patch)
2009-12-28 11:45 PST
,
Chang Shu
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Chang Shu
Comment 1
2009-12-20 08:03:49 PST
Created
attachment 45280
[details]
fix patch
WebKit Review Bot
Comment 2
2009-12-20 08:06:53 PST
Attachment 45280
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 JavaScriptCore/wtf/qt/ThreadingQt.cpp:183: static_cast is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 1
Adam Barth
Comment 3
2009-12-20 09:45:35 PST
Haha. That's a lame false positive from the style bot. I'll file a bug.
Shinichiro Hamaji
Comment 4
2009-12-20 10:08:49 PST
My apologies. This is my mistake. I posted a patch to fix this false alarm. Thanks Adam for filing this bug.
Chang Shu
Comment 5
2009-12-23 13:59:48 PST
Created
attachment 45450
[details]
fix patch to take care both synchronous and asynchronous mode
WebKit Review Bot
Comment 6
2009-12-23 14:00:14 PST
style-queue ran check-webkit-style on
attachment 45450
[details]
without any errors.
Laszlo Gombos
Comment 7
2009-12-24 08:54:38 PST
Comment on
attachment 45450
[details]
fix patch to take care both synchronous and asynchronous mode This looks good to me as detachThread() could be called from any thread including "self" thread, but the ThreadPrivate destructor is called from the main application thread. LGTM, r=me.
WebKit Commit Bot
Comment 8
2009-12-24 09:03:51 PST
Comment on
attachment 45450
[details]
fix patch to take care both synchronous and asynchronous mode Clearing flags on attachment: 45450 Committed
r52550
: <
http://trac.webkit.org/changeset/52550
>
WebKit Commit Bot
Comment 9
2009-12-24 09:03:57 PST
All reviewed patches have been landed. Closing bug.
Laszlo Gombos
Comment 10
2009-12-24 09:36:33 PST
REOPEN as The change regressed the following LayoutTests for QtWebKit. fast/workers/worker-call.html -> crashed fast/workers/worker-close.html -> crashed Reverted as
http://trac.webkit.org/changeset/52551
.
Chang Shu
Comment 11
2009-12-28 10:54:09 PST
Created
attachment 45563
[details]
fix crash in patch 2 calling deleteLater in detachThread may not guarantee the thread is finished while being deleted. Using a slot function to capture the finished() signal and calling deleteLater from there is safe.
WebKit Review Bot
Comment 12
2009-12-28 10:57:07 PST
Attachment 45563
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 JavaScriptCore/wtf/qt/ThreadingQt.cpp:72: Place brace on its own line for function definitions. [whitespace/braces] [4] JavaScriptCore/wtf/qt/ThreadingQt.cpp:78: Place brace on its own line for function definitions. [whitespace/braces] [4] JavaScriptCore/wtf/qt/ThreadingQt.cpp:291: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Total errors found: 3
Chang Shu
Comment 13
2009-12-28 11:45:59 PST
Created
attachment 45564
[details]
fix style check fixed the first 2 style checks. I think the 3rd one is a kind of false alarm. Qt requires to put "#include *.moc" at the end of the cpp file. I ran the check-webkit-style script on some existing files and got the same complains.
WebKit Review Bot
Comment 14
2009-12-28 11:48:02 PST
Attachment 45564
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 JavaScriptCore/wtf/qt/ThreadingQt.cpp:293: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Total errors found: 1
Laszlo Gombos
Comment 15
2009-12-28 12:16:11 PST
Comment on
attachment 45564
[details]
fix style check Looks good, r=me
WebKit Commit Bot
Comment 16
2009-12-28 12:28:59 PST
Comment on
attachment 45564
[details]
fix style check Clearing flags on attachment: 45564 Committed
r52602
: <
http://trac.webkit.org/changeset/52602
>
WebKit Commit Bot
Comment 17
2009-12-28 12:29:04 PST
All reviewed patches have been landed. Closing bug.
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