Bug 70725 - [Qt][WK2] Crash when running pixel tests
Summary: [Qt][WK2] Crash when running pixel tests
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Balazs Kelemen
Keywords: Qt, QtTriaged
Depends on:
Reported: 2011-10-24 08:00 PDT by Balazs Kelemen
Modified: 2011-10-24 10:33 PDT (History)
0 users

See Also:

Patch (1.52 KB, patch)
2011-10-24 10:13 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2011-10-24 08:00:03 PDT
Linux, 64-bit, up-to-date qt5.

#0  0x00007f14d526f509 in memcpy () from /lib64/libc.so.6
#1  0x00007f14d62b5849 in MD5Update (ctx=0x764188, buf=0xc3cff0 "", len=2304) at tools/../../3rdparty/md5/md5.cpp:95
#2  0x00007f14d62b8b27 in QCryptographicHash::addData (this=0x7fff5f3ec840, data=
    0x9cc8f0 "\377\377\377\377...
#3  0x00000000004096ea in WTR::TestInvocation::dumpPixelsAndCompareWithExpected(OpaqueWKImage const*, OpaqueWKArray const*) ()
#4  0x000000000040c140 in WTR::TestInvocation::didReceiveMessageFromInjectedBundle(OpaqueWKString const*, void const*) ()
#5  0x00007f14d986d71e in WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebKit::WebContext*, WTF::String const&, WebKit::APIObject*) () from /home/balazs/work/master_clean/wk2BUild/Release/bin/../lib/libQtWebKit.so.4
Comment 1 Balazs Kelemen 2011-10-24 10:07:50 PDT
Oops, my fault in  http://trac.webkit.org/changeset/94524:
hash.addData(reinterpret_cast<const char*>(image.constScanLine(row)), image.width() * image.bytesPerLine());

|width * bytesperline| is a bit too much ...
Comment 2 Balazs Kelemen 2011-10-24 10:13:23 PDT
Created attachment 112207 [details]
Comment 3 Chang Shu 2011-10-24 10:19:33 PDT
Comment on attachment 112207 [details]

Just curious how this worked before. In addition, bytesPerLine sounds like it has taken width into consideration.
Comment 4 Chang Shu 2011-10-24 10:21:17 PDT
Comment on attachment 112207 [details]

sorry, i thought the code was added but it was removed. r=me.
Comment 5 Balazs Kelemen 2011-10-24 10:32:03 PDT
Comment on attachment 112207 [details]

Clearing flags on attachment: 112207

Committed r98252: <http://trac.webkit.org/changeset/98252>
Comment 6 Balazs Kelemen 2011-10-24 10:32:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Balazs Kelemen 2011-10-24 10:33:28 PDT
(In reply to comment #4)
> (From update of attachment 112207 [details])
> sorry, i thought the code was added but it was removed. r=me.

Sure, the value we passed was way too high, but sometimes it was working well with memory garbage :)
Thanks for the review.