WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
315236
Content rule list store may end up copying compiled bytecode files
https://bugs.webkit.org/show_bug.cgi?id=315236
Summary
Content rule list store may end up copying compiled bytecode files
Adrian Perez
Reported
2026-05-20 15:19:30 PDT
When compiling a JSON rule list, the flow is roughly: 1. Calculate the destination location for the compiled file. 2. Create a temporary file, using WTF::openTemporaryFile(). 3. Write compiled bytecode to the temporary file. 4. Delete the destination file (if exists). 5. Use WTF::moveFile() to “rename” the temporary file in the final location. The issue here is that (2.) uses a platform-dependent temporary directory for created temporary files, and for some ports it can easily end up being in a file system different than the final destination, resulting in WTF::moveFile() falling back to a *synchronous* copy. Case example: the GTK and WPE ports use g_get_tmp_dir() for the temporary file location, which most of the time will be /tmp. On modern Linux distributions and embedded devices this can very easily be in-memory (tmpfs), and/or the user's home directory (where programs will configure the ContentRuleListStore data directory) may be on its own volume.
Attachments
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2026-05-20 16:02:04 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65336
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