Closed Bug 1377803 Opened 7 years ago Closed 7 years ago

Remove unnecessary plarena.h #includes

Categories

(Core :: WebRTC: Signaling, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(2 files)

These files don't use PLArena or anything else from plarena.h.
It would be nice to get rid of the plarena.h #include in
media/webrtc/trunk/webrtc/base/sanitizer.h, but that's a harder lift because
it's in third-party code.
Attachment #8882935 - Flags: review?(rjesup)
Comment on attachment 8882935 [details] [diff] [review]
Remove unnecessary plarena.h #includes

Review of attachment 8882935 [details] [diff] [review]:
-----------------------------------------------------------------

As jesup is on PTO.

The plarena.h include in sanitizer.h is not coming from upstream. We added that in our local clone. So as long as we can still build ASAN without it as per this comment:
http://searchfox.org/mozilla-central/source/media/webrtc/trunk/webrtc/base/sanitizer.h#15
I think we should remove it as part of this patch as well.
Attachment #8882935 - Flags: review?(rjesup) → review+
Thank you for taking the review.

> The plarena.h include in sanitizer.h is not coming from upstream. We added
> that in our local clone. So as long as we can still build ASAN without it as
> per this comment:
> http://searchfox.org/mozilla-central/source/media/webrtc/trunk/webrtc/base/sanitizer.h#15
> I think we should remove it as part of this patch as well.

I tried removing it here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d15650390b25cf14fc8fcec43a6da0878345034a

The ASAN jobs failed to build. There's a symbol visibility mismatch, but I don't understand it enough to diagnose.

glandium, do you understand these? It would be nice to remove that plarena.h include if we can.
Flags: needinfo?(mh+mozilla)
Hmm, the problem is that media/webrtc/trunk/webrtc/base/sanitizer.h is including <sanitizer/asan_interface.h>, which declares the __asan_* functions, and also including "mozilla/MemoryChecking.h", which has its own MOZ_ASAN_VISIBILITY declarations of those functions. Somehow, including "plarena.h" -- which has its own declarations of the __asan_* functions -- avoids the problem.
You need to add sanitizer/asan_interface.h to config/system-headers, or make webrtc's sanitizer.h not use it.

> Somehow, including "plarena.h" -- which has its own declarations of the __asan_* functions -- avoids the problem.

Most likely reason is that plarena.h was included first, setting the visibility for those symbols to default. Now sanitizer/asan_interface.h comes first, and has the symbols set to visibility hidden because the header is not wrapped.
Flags: needinfo?(mh+mozilla)
We can avoid the symbol visibility problem by putting
sanitizer/asan_interface.h in the config/system-headers.
Attachment #8883135 - Flags: review?(mh+mozilla)
Attachment #8883135 - Flags: review?(drno)
Comment on attachment 8883135 [details] [diff] [review]
Remove an unnecessary plarena.h #include in WebRTC

Review of attachment 8883135 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8883135 - Flags: review?(drno) → review+
Attachment #8883135 - Flags: review?(mh+mozilla) → review+
Rank: 15
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/b66fb73c81ee
https://hg.mozilla.org/mozilla-central/rev/2b926d6497a9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: