Closed Bug 1757754 Opened 3 years ago Closed 3 years ago

Perma Windows MinGW all [tier 2] /builds/worker/checkouts/gecko/xpcom/io/nsLocalFileWin.cpp:265:10: error: use of undeclared identifier 'ERROR_CONTENT_BLOCKED'

Categories

(Core :: XPCOM, defect, P2)

defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- unaffected
firefox98 --- unaffected
firefox99 + fixed

People

(Reporter: intermittent-bug-filer, Assigned: jan.rio.krause)

References

(Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [retriggered][stockwell needswork:owner])

Attachments

(1 file)

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


[task 2022-03-02T14:24:23.969Z] 14:24:23     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/xpcom/io'
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/i686-w64-mingw32-clang++ -std=gnu++17 -o nsLocalFileWin.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -ftrivial-auto-var-init=pattern -DDEBUG=1 -DUNICODE -D_UNICODE -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DOS_WIN=1 -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINAPI_NO_BUNDLED_LIBRARIES -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/xpcom/io -I/builds/worker/workspace/obj-build/xpcom/io -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/workspace/obj-build/xpcom -I/builds/worker/checkouts/gecko/xpcom/build -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 -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-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 -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wno-unknown-pragmas -Wno-unused-function -Wno-conversion-null -Wno-switch -Wno-enum-compare -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fms-extensions -fcrash-diagnostics-dir=/builds/worker/artifacts -D_HAS_EXCEPTIONS=0 -fno-exceptions -Wno-incompatible-ms-struct -mstackrealign -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -g -gcodeview -O2 -fno-omit-frame-pointer -funwind-tables -fno-strict-aliasing  -MD -MP -MF .deps/nsLocalFileWin.o.pp   /builds/worker/checkouts/gecko/xpcom/io/nsLocalFileWin.cpp
[task 2022-03-02T14:24:23.973Z] 14:24:23    ERROR -  /builds/worker/checkouts/gecko/xpcom/io/nsLocalFileWin.cpp:265:10: error: use of undeclared identifier 'ERROR_CONTENT_BLOCKED'
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -      case ERROR_CONTENT_BLOCKED:
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -           ^
[task 2022-03-02T14:24:23.973Z] 14:24:23  WARNING -  /builds/worker/checkouts/gecko/xpcom/io/nsLocalFileWin.cpp:1658:20: warning: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Wclass-varargs]
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -                     NS_ConvertASCIItoUTF16(nsDependentCString(aField)).get());
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -                     ^
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -  1 warning and 1 error generated.
[task 2022-03-02T14:24:23.973Z] 14:24:23    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:658: nsLocalFileWin.o] Error 1
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/xpcom/io'
[task 2022-03-02T14:24:23.973Z] 14:24:23    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: xpcom/io/target-objects] Error 2
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -  gmake[3]: *** Waiting for unfinished jobs....
[task 2022-03-02T14:24:23.973Z] 14:24:23     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/xpcom/reflect/xptinfo'
Regressed by: 1690326
See Also: 1690326

Hi Jan! Can you please take a look at this? This is caused by your recent changes in Bug 1690326.
Thank you!

Flags: needinfo?(jkrause)

Iulian, thank you for letting me know. I'm already on it.

Assignee: nobody → jkrause
Flags: needinfo?(jkrause)

This constant is in mingw: https://searchfox.org/mingw-moz/search?q=ERROR_CONTENT_BLOCKED&path=&case=false&regexp=false

Maybe the header is not included? You can do try builds for the mingw compilation to test.

Changing the priority to p2 as the bug is tracked by a release manager for the current nightly.
See What Do You Triage for more information

Priority: P5 → P2

(In reply to Tom Ritter [:tjr] (ni? for response to CVE/sec-approval/advisories/etc) from comment #3)

This constant is in mingw: https://searchfox.org/mingw-moz/search?q=ERROR_CONTENT_BLOCKED&path=&case=false&regexp=false

Maybe the header is not included? You can do try builds for the mingw compilation to test.

So if searchfox is not lying, those headers are not in-tree (there is only something for rust and for the crashreporter ) for none of our build variants (which makes sense as they are part of the OS environment). That would probably mean that the build-win32-mingwclang task definition in treeherder contains an old snapshot of MinGW, but I (and Jan) do not know how to update or even check this.

Flags: needinfo?(tom)

https://searchfox.org/mingw-moz/source/ is the version of mingw used in mozilla-central; https://searchfox.org/mingw/source/ is upstream - so it is in our version. I meant that perhaps the winerror.h header is not included where you use this constant; but it is included by default in the clang-cl builds and not mingw.

Flags: needinfo?(tom)

(In reply to Tom Ritter [:tjr] (ni? for response to CVE/sec-approval/advisories/etc) from comment #6)

https://searchfox.org/mingw-moz/ is the version of mingw used in mozilla-central;

The first link is giving me a 404? I can see the taskcluster scripts in searchfox but I am totally lost here.

While mingw-w64-tools/widl/include/winerror.h contains ERROR_CONTENT_BLOCKED, mingw-w64-headers/include/winerror.h does not. What's the difference of them?

(In reply to Jens Stutte [:jstutte] from comment #7)

The first link is giving me a 404?

Searchfox should not give 404 for the top page...
https://searchfox.org/mingw-moz/source/

Flags: needinfo?(tom)

Sorry; I was trying to link to the searchfox root, but it requires /source/ at the end; I updated the link.

Searchfox indexes mingw-w64 (and llvm, and rust, and some other non-mozilla repositories) for convenience. /mingw-moz/ is the source code for the specific mingw commit we use in m-c; while /mingw/ is upstream's tip.

Because ERROR_CONTENT_BLOCKED is present in the version of MinGW used in mozilla-central, my first guess is that xpcom/io/nsLocalFileWin.cpp needs an #include<winerror.h>

But now I see that winerror is included in WinHeaderOnlyUtils.h which is included in nsLocalFileWin so it seems like that is not the problem...

(In reply to Masatoshi Kimura [:emk] from comment #8)

While mingw-w64-tools/widl/include/winerror.h contains ERROR_CONTENT_BLOCKED, mingw-w64-headers/include/winerror.h does not. What's the difference of them?

Ah; thanks for pointing that out. Yeah; that needs to get fixed. The workaround here is an #ifdef __MINGW32__ that defines ERROR_CONTENT_BLOCKED; and a bug similar to Bug 1664365 blocking Bug 1465790 to remove the workaround.

Flags: needinfo?(tom)

Well, that sounds similar to what we did the first time we hit this (without thinking too much) in bug 1709887. We can just add another #ifdef here and file the additional bug to remove both.

See Also: → 1709887
Flags: needinfo?(jkrause)
Whiteboard: [retriggered][stockwell needswork:owner]
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8731b76279d4 Fix MinGW build failure by defining `ERROR_CONTENT_BLOCKED`. r=xpcom-reviewers,nika

(In reply to Tom Ritter [:tjr] (ni? for response to CVE/sec-approval/advisories/etc) from comment #10)

and a bug similar to Bug 1664365 blocking Bug 1465790 to remove the workaround.

Hi Jan-Rio, I just landed the patch to repair the broken builds asap. Please file the removal bug (for both defines we added so far) as asked for by Tom, thanks.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Blocks: 1758681

Jens, thanks for landing the patch. I just filed Bug 1758681 to keep track of the MinGW version and the temporary workarounds.

Flags: needinfo?(jkrause)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: