Bug 228874

Summary: MallocBench: fix ODR violation
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Tools / TestsAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, ews-watchlist, ggaren, jbedard, mcatanzaro, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2021-08-06 14:25:28 PDT
When built with LTO enabled, GCC will warn about violations of C++'s one-definition rule. MallocBench has two different Objects in two different files, which is illegal. We could rename one of them, but I decided it's simplest to just put them each in anonymous namespaces in order to restrict them to file scope.
Comment 1 Michael Catanzaro 2021-08-06 14:27:18 PDT
Created attachment 435087 [details]
Patch
Comment 2 Geoffrey Garen 2021-08-06 15:05:04 PDT
Comment on attachment 435087 [details]
Patch

r=me
Comment 3 EWS 2021-08-06 15:13:39 PDT
Committed r280738 (240324@main): <https://commits.webkit.org/240324@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435087 [details].
Comment 4 Radar WebKit Bug Importer 2021-08-06 15:14:17 PDT
<rdar://problem/81634723>