[Webkit-unassigned] [Bug 194612] EnvironmentUtilities::stripValuesEndingWithString isn't thread-safe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 14 13:48:15 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=194612

--- Comment #5 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to Alexey Proskuryakov from comment #3)
> Are you saying that you see the fact that initializeThreading was called as
> a sign that any code could be running on a secondary thread? I don't think
> that is closely enough related to be relevant here.

Right: it's kinda a big hammer, and not even accurate enough since it's of course possible to have non-WTF threads before calling WTF::initializeThreading. (Maybe there are pthread APIs to detect if threads have been created; not sure.) And these APIs should never be used in the UI process under any circumstances. But anyway, this check will catch the vast majority of potential misuse, so I think it's a good check to have.

> Can you describe the specific scenario that you are concerned about? "Thread
> safe" has many different meanings, so it's rarely a good way to describe
> threading related requirements or issues.

Goal is to prevent use of Environment::set and Environment::unset except *very* early in WebKit's initialization. (Ideally also only in secondary processes, although it's not clear how we could enforce that.) Using setenv() or unsetenv() directly would bypass these checks, but there's not much we can do about that besides add a style checker rule.

There's more discussion in https://bugs.webkit.org/show_bug.cgi?id=194370#c6 (a different bug from the one mentioned above).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190214/179a910b/attachment.html>


More information about the webkit-unassigned mailing list