Closed Bug 1945305 Opened 1 year ago Closed 1 year ago

Perma build bustage /builds/worker/checkouts/gecko/js/src/jit/AtomicOp.h(46,36): error: too many arguments provided to function-like macro invocation when Gecko 136 merges to beta on 2025-02-03

Categories

(Core :: JavaScript Engine: JIT, defect)

defect

Tracking

()

VERIFIED FIXED
136 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox134 --- unaffected
firefox135 --- unaffected
firefox136 + verified

People

(Reporter: smolnar, Assigned: anba)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Central as Beta simulation

How to run these simulations

Failure log

In file included from /builds/worker/checkouts/gecko/js/src/jit/shared/Assembler-shared.h:17:
[task 2025-02-01T10:10:36.120Z] 10:10:36    ERROR -  /builds/worker/checkouts/gecko/js/src/jit/AtomicOp.h(46,36): error: too many arguments provided to function-like macro invocation
[task 2025-02-01T10:10:36.120Z] 10:10:36     INFO -     46 |   constexpr explicit MemoryBarrier(MembarBits... bits)
[task 2025-02-01T10:10:36.121Z] 10:10:36     INFO -        |                                    ^
[task 2025-02-01T10:10:36.121Z] 10:10:36     INFO -  /builds/worker/fetches/vs/Windows Kits/10/Include/10.0.22621.0/um/winnt.h(5711,9): note: macro 'MemoryBarrier' defined here
[task 2025-02-01T10:10:36.121Z] 10:10:36     INFO -   5711 | #define MemoryBarrier()             __dmb(_ARM64_BARRIER_SY)
[task 2025-02-01T10:10:36.121Z] 10:10:36     INFO -        |         ^
[task 2025-02-01T10:10:36.121Z] 10:10:36     INFO -  1 error generated.
[task 2025-02-01T10:10:36.121Z] 10:10:36    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:675: Unified_cpp_js_src25.obj] Error 1
[task 2025-02-01T10:10:36.122Z] 10:10:36     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src'
[task 2025-02-01T10:10:36.122Z] 10:10:36     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/media/libcubeb/src'
[task 2025-02-01T10:10:36.124Z] 10:10:36     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -fms-compatibility-version=19.39 -std:c++17 --target=aarch64-windows-msvc -Xclang -ivfsoverlay -Xclang /builds/worker/fetches/vs/overlay.yaml -Focubeb_wasapi.obj -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -guard:cf,nochecks -DNDEBUG=1 -DTRIMMED=1 -DCUBEB_GECKO_BUILD -DUNICODE -DUSE_WINMM -DUSE_WASAPI -DWINAPI_NO_BUNDLED_LIBRARIES -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_SUPPORT_LEAKCHECKING -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/media/libcubeb/src -I/builds/worker/workspace/obj-build/media/libcubeb/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -DMOZILLA_CLIENT -FI /builds/worker/workspace/obj-build/mozilla-config.h -Zc:sizedDealloc- -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -TP -GR- -D_HAS_EXCEPTIONS=0 -fcrash-diagnostics-dir=/builds/worker/artifacts -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -W3 -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wvolatile -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -Xclang -ffp-contract=off -DNS_FREE_PERMANENT_DATA=1 /clang:-fprofile-generate -mllvm -pgo-temporal-instrumentation -mllvm -enable-name-compression=false -Xclang -MP -Xclang -dependency-file -Xclang .deps/cubeb_wasapi.obj.pp -Xclang -MT -Xclang cubeb_wasapi.obj   /builds/worker/checkouts/gecko/media/libcubeb/src/cubeb_wasapi.cpp
[task 2025-02-01T10:10:36.124Z] 10:10:36     INFO -  /builds/worker/checkouts/gecko/media/libcubeb/src/cubeb_wasapi.cpp(7,9): warning: '_WIN32_WINNT' macro redefined [-Wmacro-redefined]
[task 2025-02-01T10:10:36.124Z] 10:10:36     INFO -      7 | #define _WIN32_WINNT 0x0603
[task 2025-02-01T10:10:36.124Z] 10:10:36     INFO -        |         ^
[task 2025-02-01T10:10:36.124Z] 10:10:36     INFO -  /builds/worker/workspace/obj-build/mozilla-config.h(150,9): note: previous definition is here
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -    150 | #define _WIN32_WINNT 0x0A00
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -        |         ^
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -  /builds/worker/checkouts/gecko/media/libcubeb/src/cubeb_wasapi.cpp(8,9): warning: 'NOMINMAX' macro redefined [-Wmacro-redefined]
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -      8 | #define NOMINMAX
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -        |         ^
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -  /builds/worker/workspace/obj-build/mozilla-config.h(121,9): note: previous definition is here
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -    121 | #define NOMINMAX 1
[task 2025-02-01T10:10:36.125Z] 10:10:36     INFO -        |         ^
[task 2025-02-01T10:10:36.126Z] 10:10:36     INFO -  2 warnings generated.
[task 2025-02-01T10:10:36.126Z] 10:10:36     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/media/libcubeb/src'
[task 2025-02-01T10:10:36.126Z] 10:10:36     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/js/src'
[task 2025-02-01T10:10:36.126Z] 10:10:36     INFO -  js/src/Unified_cpp_js_src26.obj
[task 2025-02-01T10:10:36.126Z] 10:10:36     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src'
[task 2025-02-01T10:10:36.126Z] 10:10:36     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/media/libcubeb/src'
[task 2025-02-01T10:10:36.127Z] 10:10:36     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/media/libcubeb/src'
[task 2025-02-01T10:10:36.127Z] 10:10:36     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/js/src'
[task 2025-02-01T10:10:36.127Z] 10:10:36     INFO -  js/src/Unified_cpp_js_src27.obj
Flags: needinfo?(andrebargull)
Attached file ok —

Don't allow to directly include any of:

  • <windows.h>
  • <winbase.h>
  • <windef.h>

Instead require to use "util/WindowsWrapper.h" which takes care to #undef common
function names.

<windows.h> includes both <winbase.h> and <windef.h> and is also the
preferred way to include Windows headers, so it's okay to always use
"util/WindowsWrapper.h".

Bug 1945305 happened because Beta builds bundle "vm/ToSource.cpp" and "vm/Time.cpp"
in the same unified cpp-file. "vm/ToSource.cpp" has a transitive dependency to
"jit/AtomicOp.h", which defines the class jit::MemoryBarrier. And "vm/Time.cpp"
includes <winbase.h> and <windef.h>, which define a macro named MemoryBarrier.

Assignee: nobody → andrebargull
Status: NEW → ASSIGNED

The patch is working in today's beta simulation.

Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/439fd7bd332f Add check to disallow directly including Windows headers. r=jandem
Pushed by amarc@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/e3b64b4067bf Add check to disallow directly including Windows headers. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Flags: needinfo?(andrebargull)

The patch is verified in today's beta simulation.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: