Closed Bug 2084870 Opened 29 days ago Closed 27 days ago

[clang-23] Perma ../../Common/../../Windows/Synchronization.h:180:48: fatal error: parameter in intra-TU constructor should be marked [[clang::lifetimebound]] [-Wlifetime-safety-intra-tu-constructor-suggestions]

Categories

(Firefox Build System :: Toolchains, defect, P5)

defect

Tracking

(firefox161 fixed)

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

Filed by: mh [at] glandium.org
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=601759253&repo=try&task=MrIwIa8oSiakwG3adyfQCw.0
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/MrIwIa8oSiakwG3adyfQCw/runs/0/artifacts/public/logs/live_backing.log


[task 2026-10-22T00:50:28.683+00:00] clang++ --sysroot=/builds/worker/fetches/sysroot-x86_64-linux-gnu     -O2 -c -Werror -Wall -Wextra -Weverything -Wfatal-errors -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC       -o b/c/MemBlocks.o ../../Common/MemBlocks.cpp
[task 2026-10-22T00:50:28.717+00:00] In file included from ../../Common/MemBlocks.cpp:7:
[task 2026-10-22T00:50:28.717+00:00] In file included from ../../Common/MemBlocks.h:8:
[task 2026-10-22T00:50:28.717+00:00] ../../Common/../../Windows/Synchronization.h:180:48: fatal error: parameter in intra-TU constructor should be marked [[clang::lifetimebound]] [-Wlifetime-safety-intra-tu-constructor-suggestions]
[task 2026-10-22T00:50:28.717+00:00]   180 |   CCriticalSectionLock(CCriticalSection &object): _object(&object) {_object->Enter(); }
[task 2026-10-22T00:50:28.717+00:00]       |                        ~~~~~~~~~~~~~~~~~~~~~~~~^
[task 2026-10-22T00:50:28.717+00:00]       |                                                 [[clang::lifetimebound]]
[task 2026-10-22T00:50:28.717+00:00] ../../Common/../../Windows/Synchronization.h:177:21: note: escapes to this field
[task 2026-10-22T00:50:28.717+00:00]   177 |   CCriticalSection *_object;
[task 2026-10-22T00:50:28.717+00:00]       |   ~~~~~~~~~~~~~~~~~~^~~~~~~
[task 2026-10-22T00:50:28.725+00:00] 1 error generated.
Blocks: clang-23

And apply an additional patch to fix lifetimebound related
warning-as-errors that appeared with clang 23.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4f9ade73c7e1 https://hg.mozilla.org/integration/autoland/rev/d5d0ec9c9f3e Revert "Bug 2084870 - Upgrade 7-zip to 26.05. r=firefox-build-system-reviewers,ahochheiden" for causing 7zz bustage

Backed out for causing 7zz bustage

Flags: needinfo?(mh+mozilla)

(In reply to Treeherder Bug Filer from comment #0)

[task 2026-10-22T00:50:28.683+00:00] clang++ --sysroot=/builds/worker/fetches/sysroot-x86_64-linux-gnu -O2 -c -Werror -Wall -Wextra -Weverything -Wfatal-errors -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -o b/c/MemBlocks.o ../../Common/MemBlocks.cpp

glandium, it looks like 7-Zip opts into clang's extremely-aggressive -Weverything flag. If they want to support -Weverything upstream, that's cool, but maybe we should just patch out -Weverything from our build so you don't have to deal with their fallout?

https://github.com/ip7z/7zip/blob/b88c6bc09339de32f7d18bbab900686b244f42ba/CPP/Build.mak#L83

CFLAGS = $(CFLAGS) -Werror -Wall -Wextra -Weverything -Wfatal-errors
Status: ASSIGNED → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
Flags: needinfo?(mh+mozilla)

(In reply to Chris Peterson [:cpeterson] from comment #5)

glandium, it looks like 7-Zip opts into clang's extremely-aggressive -Weverything flag. If they want to support -Weverything upstream, that's cool, but maybe we should just patch out -Weverything from our build so you don't have to deal with their fallout?

I know, but that was an easy fix.

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

Attachment

General

Created:
Updated:
Size: