Bug 254532
| Summary: | [CG] Building the dictionary of the async image decoding options is not thread safe | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
| Component: | Images | Assignee: | Said Abou-Hallawa <sabouhallawa> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Said Abou-Hallawa
imageSourceThumbnailOptions() is called to build the dictionary of the async image decoding options. It uses the static variable `options` which is initialized the first time this function is called. If this function is called from multiple threads at the same time, more than one thread can see that the static variable `options` is initialized and may initialize it then. Setting the variable from these threads are not be atomic. So we may be end up with invalid pointer for this static variable.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Said Abou-Hallawa
rdar://106302373
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/12015
EWS
Committed 262175@main (04196137234f): <https://commits.webkit.org/262175@main>
Reviewed commits have been landed. Closing PR #12015 and removing active labels.