| Summary: | std::once_flag must be allocated in static storage | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | achristensen, darin, ddkilzer, ews-watchlist, glenn, jbedard, mark.lam, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Yusuke Suzuki
2020-10-02 19:44:17 PDT
Created attachment 410407 [details]
Patch
Comment on attachment 410407 [details]
Patch
r=me
Comment on attachment 410407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410407&action=review > Source/WebCore/ChangeLog:8 > + Since std::once_flag is an usual variable, this does not prevent us from calling it multiple times. Did you mean "If the std::once_flag is a non-static variable, it will not prevent ..."? Committed r267917: <https://trac.webkit.org/changeset/267917> Comment on attachment 410407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410407&action=review >> Source/WebCore/ChangeLog:8 >> + Since std::once_flag is an usual variable, this does not prevent us from calling it multiple times. > > Did you mean "If the std::once_flag is a non-static variable, it will not prevent ..."? Fixed. Comment on attachment 410407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410407&action=review > Source/WebCore/platform/text/TextCodecSingleByte.cpp:180 > - std::once_flag once; > + static std::once_flag once; Oops, guess it was me who made this mistake. Thank you for fixing it! Sadly, I believe this is caught by the clang static analyzer as well. |