[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)
Tracking
(firefox161 fixed)
| 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.
| Assignee | ||
Comment 1•29 days ago
|
||
And apply an additional patch to fix lifetimebound related
warning-as-errors that appeared with clang 23.
Updated•29 days ago
|
Backed out for causing 7zz bustage
Comment 5•28 days ago
|
||
(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
Comment 7•27 days ago
|
||
| bugherder | ||
| Comment hidden (Intermittent Failures Robot) |
| Assignee | ||
Updated•24 days ago
|
| Assignee | ||
Comment 9•24 days ago
|
||
(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.
Description
•