Closed Bug 1807652 Opened 3 years ago Closed 3 years ago

ProfilerThreadRegistration.h:217:38: error: declaration of ‘mozilla::profiler::ThreadRegistration::OnThreadRef::RWOnThreadWithLock mozilla::profiler::ThreadRegistration::OnThreadRef::LockedRWOnThread()’ changes meaning of ‘LockedRWOnThread’ [-fpermissive]

Categories

(Core :: Gecko Profiler, defect, P2)

Firefox 108
defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: mliska, Assigned: canova)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Steps to reproduce:

Build Firefox with GCC 13

Actual results:

[ 109s] 0:44.92 | ^
[ 109s] 0:44.97 In file included from /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerThreadState.h:14,
[ 109s] 0:44.97 from /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerLabels.h:14,
[ 109s] 0:44.97 from /home/abuild/rpmbuild/BUILD/obj/ipc/ipdl/PDocAccessiblePlatformExtChild.cpp:8,
[ 109s] 0:44.97 from Unified_cpp_ipc_extension_other0.cpp:11:
[ 109s] 0:44.97 /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerThreadRegistration.h: At global scope:
[ 109s] 0:44.97 /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerThreadRegistration.h:217:38: error: declaration of ‘mozilla::profiler::ThreadRegistration::OnThreadRef::RWOnThreadWithLock mozilla::profiler::ThreadRegistration::OnThreadRef::LockedRWOnThread()’ changes meaning of ‘LockedRWOnThread’ [-fpermissive]
[ 109s] 0:44.97 217 | [[nodiscard]] RWOnThreadWithLock LockedRWOnThread() {
[ 109s] 0:44.97 | ^~~~~~~~~~~~~~~~
[ 109s] 0:44.97 /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerThreadRegistration.h:213:7: note: used here to mean ‘using mozilla::profiler::ThreadRegistration::LockedRWOnThread = class mozilla::profiler::ThreadRegistrationLockedRWOnThread’
[ 109s] 0:44.97 213 | LockedRWOnThread& mLockedRWOnThread;
[ 109s] 0:44.97 | ^~~~~~~~~~~~~~~~
[ 109s] 0:44.97 /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerThreadRegistration.h:63:9: note: declared here
[ 109s] 0:44.97 63 | using LockedRWOnThread = ThreadRegistrationLockedRWOnThread;
[ 109s] 0:44.97 | ^~~~~~~~~~~~~~~~
[ 109s] 0:44.97 In file included from /home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/ProfilerThreadState.h:15:

The Bugbug bot thinks this bug should belong to the 'Core::Gecko Profiler' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Gecko Profiler
Product: Firefox → Core

The severity field is not set for this bug.
:canova, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(canaltinova)
Attached file build.log.xz (GCC 13)

Reproduced with GCC 13.0.0_pre20230115. Attaching my build log.

I can probably hack up a Dockerfile or similar to make it easier to get GCC 13, if required.

Assignee: nobody → canaltinova
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(canaltinova)
Priority: -- → P2

We have some aliases with the names of LockedRWFromAnyThread and
LockedRWOnThread. We also had some methods with the same name. clang and gcc
that were before version 12 weren't complaining about that. But apparently
starting from gcc 13, it became an error. This patch renames the methods so we
don't conflict with these aliases anymore.

Thanks for the bug report and sorry for looking at this late.

I had some problems finding gcc 13, that's why I compiled my own from the master branch. I got some more errors that were not related to profiler though. That's why I'm exactly sure what's happening there. It would be great if you can verify that this patch fixes your problem.

Thanks for the patch. I can confirm it fixed the reported problem. Note I see still some problems related to:
https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes

/home/abuild/rpmbuild/BUILD/obj/dist/include/mozilla/gfx/Rect.h:328:47: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
/home/abuild/rpmbuild/BUILD/firefox-109.0.1/toolkit/components/telemetry/pingsender/pingsender.cpp:30:7: error: 'uint32_t' does not name a type

and there's one GCC issue that I'm reducing right now:

lto1: internal compiler error: in force_decl_die, at dwarf2out.cc:26770

Awesome, thanks for checking!
It looks like the other issues are related to Graphics and Telemetry. Would you mind filing separate bugs for them?

and there's one GCC issue that I'm reducing right now:

lto1: internal compiler error: in force_decl_die, at dwarf2out.cc:26770

It's reported as:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108772

It looks like the other issues are related to Graphics and Telemetry. Would you mind filing separate bugs for them?

Sure.

Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/8d310a8b6460 Rename some methods to not conflict with aliases r=mstange
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: