Closed Bug 1619618 Opened 5 years ago Closed 5 years ago

sMmapAccessScope; error: initializer for thread-local variable must be a constant expression

Categories

(Core :: Networking: JAR, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1619206

People

(Reporter: stransky, Unassigned)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Latest trunk fails to build on Fedora 32, I get:

0:09.17 media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_sse2_gn
0:09.82 In file included from Unified_cpp_modules_libjar0.cpp:2:
0:09.82 /home/komat/src-wayland/modules/libjar/MmapFaultHandler.cpp:18:43: error: initializer for thread-local variable must be a constant expression
0:09.82 static MOZ_THREAD_LOCAL(MmapAccessScope*) sMmapAccessScope;
0:09.82 ^~~~~~~~~~~~~~~~
0:09.82 /home/komat/src-wayland/modules/libjar/MmapFaultHandler.cpp:18:43: note: use 'thread_local' to allow this

I use mozilla build environment / clang to build it.

I think this belongs in Networking:JAR based upon other bugs that have touched MmapFaultHandler.cpp.

Component: WebRTC → Networking: JAR

Michal, can you take a look?
I will put it to P3, feel free to change it.

Flags: needinfo?(michal.novotny)
Priority: -- → P3
Whiteboard: [necko-triaged]

That's on Fedora 32 / clang, I don't see that when I use gcc 10.0.

Frankly I didn't test other cases, this is the first bug I hit.
As I use gcc now it does not block me...but I don't know why it affects Fedora 32 only with clang provided by Mozilla. I didn't see that on Fedora 31 with the same clang.

Martin, you can try if you hit the error with another MOZ_THREAD_LOCAL usages with the patch above which disables sigbus handling on linux in libjar. It seems like a bug in clang. I'm marking this as a dupe of 1619206.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

(In reply to Martin Stránský [:stransky] from comment #6)

Fedora 32 only with clang provided by Mozilla.

What was the --version on that clang? As far as I know, this bug was introduced in clang 10.0.0 trunk, and Mozilla has not yet provided one of those.

Ahh you're right, I have clang version 10.0.0 (Fedora 10.0.0-0.1.rc2.fc32)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: