Bug 30777 - [Qt] Use "%lli" to format "long long" on WIN_OS to fix HTML5 WebDB crash
Summary: [Qt] Use "%lli" to format "long long" on WIN_OS to fix HTML5 WebDB crash
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-10-26 08:54 PDT by Laszlo Gombos
Modified: 2009-10-26 15:23 PDT (History)
1 user (show)

See Also:


Attachments
proposed patch (1.41 KB, patch)
2009-10-26 10:18 PDT, Laszlo Gombos
no flags Details | Formatted Diff | Diff
2nd try (1.55 KB, patch)
2009-10-26 14:06 PDT, Laszlo Gombos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Gombos 2009-10-26 08:54:39 PDT
To reproduce the original crash do the following:
 - Build QtWebKit on Windows in debug mode
 - Launch QtLauncher and navigate to http://html5demos.com/database

The crash backtrace revealed that SQLiteDatabase::setMaximumSize failed as "PRAGMA max_page_count .." SQLiteStatement was malformed because String::number(newMaxPageCount) returned "%I64u". This is because on WIN_OS "long long" is formatted using "%I64u" and Qt's QString::vsprintf does not seems to understand this format string.

Using the "%lli" to format "long long" types fixes the problem.
Comment 1 Laszlo Gombos 2009-10-26 10:18:10 PDT
Created attachment 41875 [details]
proposed patch
Comment 2 Laszlo Gombos 2009-10-26 14:06:04 PDT
Created attachment 41895 [details]
2nd try

Update the ChangeLog to describe the patch better.
Comment 3 Eric Seidel (no email) 2009-10-26 14:46:27 PDT
Comment on attachment 41895 [details]
2nd try

OK.  I'll believe you.
Comment 4 WebKit Commit Bot 2009-10-26 15:22:56 PDT
Comment on attachment 41895 [details]
2nd try

Clearing flags on attachment: 41895

Committed r50103: <http://trac.webkit.org/changeset/50103>
Comment 5 WebKit Commit Bot 2009-10-26 15:23:00 PDT
All reviewed patches have been landed.  Closing bug.