Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Issue 7511011: Only do the exclude-journal-from-Time-Machine-if-the-database-is-excluded thing for unix-flavored (Closed)

Created:
9 years, 4 months ago by Mark Mentovai
Modified:
9 years, 4 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Only do the exclude-journal-from-Time-Machine-if-the-database-is-excluded thing for unix-flavored sqlite3 VFSes. It's wrong to try to do this for the chromium_vfs sqlite3 VFS type. The exclude code should only be used for databases that are actually on disk. Under chromium_vfs, zFilename is a name but not a filesystem pathname, and in the Chromium renderer process, direct filesystem access is forbidden. The resulting CFURLRef objects did not have valid referents, and on Mac OS X 10.7 ("Lion"), they resulted in use-after-free and double-free errors. BUG=91068 TEST=With a clean profile, visit http://www.justgiving.nl/. The page should not sad tab. Nothing should be logged to the console. Previously, messages such as the following would be logged: Google Chrome Helper(12345,0xabcdef00) malloc: *** error for object 0x4545450: incorrect checksum for freed object - object was probably modified after being freed. Google Chrome Helper(12345,0xabcdef00) malloc: *** error for object 0x4545450: double free Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95435

Patch Set 1 #

Total comments: 3

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -14 lines) Patch
M third_party/sqlite/README.chromium View 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/sqlite/amalgamation/sqlite3.c View 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/sqlite/mac_time_machine.patch View 1 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/sqlite/src/src/pager.c View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Mark Mentovai
9 years, 4 months ago (2011-08-04 16:19:58 UTC) #1
mrossetti
LGTM
9 years, 4 months ago (2011-08-04 16:34:49 UTC) #2
mrossetti
Nits. http://codereview.chromium.org/7511011/diff/1/third_party/sqlite/amalgamation/sqlite3.c File third_party/sqlite/amalgamation/sqlite3.c (right): http://codereview.chromium.org/7511011/diff/1/third_party/sqlite/amalgamation/sqlite3.c#newcode41643 third_party/sqlite/amalgamation/sqlite3.c:41643: + && memcmp(pVfs->zName, "unix", 4) == 0 Nit: ...
9 years, 4 months ago (2011-08-04 16:37:23 UTC) #3
Mark Mentovai
Nits picked.
9 years, 4 months ago (2011-08-04 16:43:09 UTC) #4
Scott Hess - ex-Googler
LGTM. Debugging this was either inspired, or you're just insane, both are good, but I ...
9 years, 4 months ago (2011-08-04 18:43:28 UTC) #5
Mark Mentovai
Inspirational insanity. WebDatabase journal files will get TimeMachined because their main databases are TimeMachined. We ...
9 years, 4 months ago (2011-08-04 19:25:08 UTC) #6
Scott Hess - ex-Googler
9 years, 4 months ago (2011-08-04 19:36:21 UTC) #7
Hmm.  OK, that makes sense.  I don't think this problem is nearly as
keen for WebDatabase files as it is for things like history.  There is
probably some justification for not time-machining ANY web data files,
but I don't know if it even warrants discussion.

-scott


On Thu, Aug 4, 2011 at 12:25 PM,  <mark@chromium.org> wrote:
> Inspirational insanity.
>
> WebDatabase journal files will get TimeMachined because their main databases
> are
> TimeMachined. We don’t ever exclude a -journal independently, we only
> exclude
> them when the main database is excluded. Nobody’s ever suggested that we
> exclude
> WebDatabase databases. I don’t think we should exclude them. Do you?
>
> (If we need to go back and forth on this for more than another round or two,
> I
> agree we should discuss it on a new bug.)
>
> http://codereview.chromium.org/7511011/
>

Powered by Google App Engine
This is Rietveld 408576698