Bug 228874 - MallocBench: fix ODR violation
Summary: MallocBench: fix ODR violation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-06 14:25 PDT by Michael Catanzaro
Modified: 2021-08-06 15:14 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.24 KB, patch)
2021-08-06 14:27 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>