Closed Bug 1815666 Opened 2 years ago Closed 2 years ago

Fix HttpChannelOpenArgs Padding

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: sergesanspaille, Assigned: sergesanspaille)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

The HttpChannelOpenArgs structure from netwerk/ipc/NeckoChannelParams.ipdlh uses extra padding, as reported by clang static analyzer.

Reorder fields to optimize memory usage.

Depends on D169188

Component: General → Networking
Severity: -- → N/A
Priority: -- → P3
Whiteboard: [necko-triaged]
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7db93be29952 Fix HttpChannelOpenArgs padding r=necko-reviewers,valentin

Backed out (bug 1815667, bug 1815755, bug 1815664, bug 1815757, bug 1815758, bug 1815666) for causing build bustages on StaticComponents.cpp.

[task 2023-02-15T14:31:22.980Z] 14:31:22     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/xpcom/components'
[task 2023-02-15T14:31:22.981Z] 14:31:22     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ --sysroot /builds/worker/fetches/sysroot-x86_64-linux-gnu -Qunused-arguments -std=gnu++17 -o StaticComponents.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -I/builds/worker/workspace/obj-build/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -ftrivial-auto-var-init=pattern -DDEBUG=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/xpcom/components -I/builds/worker/workspace/obj-build/xpcom/components -I/builds/worker/workspace/obj-build/xpcom -I/builds/worker/checkouts/gecko/xpcom/base -I/builds/worker/checkouts/gecko/xpcom/build -I/builds/worker/checkouts/gecko/xpcom/ds -I/builds/worker/checkouts/gecko/chrome -I/builds/worker/checkouts/gecko/js/xpconnect/loader -I/builds/worker/checkouts/gecko/layout/build -I/builds/worker/checkouts/gecko/modules/libjar -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/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 -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Os -fno-omit-frame-pointer -funwind-tables -Werror -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -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 -Wc++2a-compat -Wenum-compare-conditional -Wenum-float-conversion -Wno-ambiguous-reversed-operator -Wno-error=deprecated -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-pragma -Wno-error=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 -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-unknown-warning-option -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/gtk-3.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/pango-1.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/glib-2.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/cairo -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/pixman-1 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/freetype2 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/libpng12 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/gdk-pixbuf-2.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/gio-unix-2.0/ -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/harfbuzz -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/atk-1.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/at-spi2-atk/2.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/at-spi-2.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/dbus-1.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/gtk-3.0/unix-print -pthread -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/dbus-1.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/glib-2.0 -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/StaticComponents.o.pp   StaticComponents.cpp
[task 2023-02-15T14:31:22.981Z] 14:31:22    ERROR -  StaticComponents.cpp:9294:13: error: ISO C++ requires field designators to be specified in declaration order; field 'mModuleID' will be initialized after field 'mProtocolFlags' [-Werror,-Wreorder-init-list]
[task 2023-02-15T14:31:22.981Z] 14:31:22     INFO -              .mProtocolFlags = nsIProtocolHandler::URI_STD | nsIProtocolHandler::URI_IS_UI_RESOURCE | nsIProtocolHandler::URI_IS_LOCAL_RESOURCE | nsIProtocolHandler::URI_NORELATIVE | nsIProtocolHandler::URI_NOAUTH,
[task 2023-02-15T14:31:22.982Z] 14:31:22     INFO -              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.982Z] 14:31:22     INFO -  StaticComponents.cpp:9293:26: note: previous initialization for field 'mModuleID' is here
[task 2023-02-15T14:31:22.982Z] 14:31:22     INFO -              .mModuleID = ModuleID::Anonymous142,
[task 2023-02-15T14:31:22.982Z] 14:31:22     INFO -                           ^~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.982Z] 14:31:22    ERROR -  StaticComponents.cpp:9302:13: error: ISO C++ requires field designators to be specified in declaration order; field 'mModuleID' will be initialized after field 'mProtocolFlags' [-Werror,-Wreorder-init-list]
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              .mProtocolFlags = nsIProtocolHandler::URI_NORELATIVE | nsIProtocolHandler::URI_NON_PERSISTABLE | nsIProtocolHandler::ALLOWS_PROXY | nsIProtocolHandler::ALLOWS_PROXY_HTTP | nsIProtocolHandler::URI_DOES_NOT_RETURN_DATA | nsIProtocolHandler::URI_DANGEROUS_TO_LOAD | nsIProtocolHandler::URI_IS_POTENTIALLY_TRUSTWORTHY,
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -  StaticComponents.cpp:9301:26: note: previous initialization for field 'mModuleID' is here
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              .mModuleID = ModuleID::Anonymous147,
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -                           ^~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.983Z] 14:31:22    ERROR -  StaticComponents.cpp:9310:13: error: ISO C++ requires field designators to be specified in declaration order; field 'mModuleID' will be initialized after field 'mProtocolFlags' [-Werror,-Wreorder-init-list]
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              .mProtocolFlags = nsIProtocolHandler::URI_STD | nsIProtocolHandler::URI_IS_UI_RESOURCE | nsIProtocolHandler::URI_IS_LOCAL_RESOURCE | nsIProtocolHandler::URI_IS_POTENTIALLY_TRUSTWORTHY,
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -  StaticComponents.cpp:9309:26: note: previous initialization for field 'mModuleID' is here
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              .mModuleID = ModuleID::Anonymous144,
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -                           ^~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.983Z] 14:31:22    ERROR -  StaticComponents.cpp:9318:13: error: ISO C++ requires field designators to be specified in declaration order; field 'mModuleID' will be initialized after field 'mProtocolFlags' [-Werror,-Wreorder-init-list]
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              .mProtocolFlags = nsIProtocolHandler::URI_STD | nsIProtocolHandler::URI_IS_UI_RESOURCE | nsIProtocolHandler::URI_IS_LOCAL_RESOURCE,
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -  StaticComponents.cpp:9317:26: note: previous initialization for field 'mModuleID' is here
[task 2023-02-15T14:31:22.983Z] 14:31:22     INFO -              .mModuleID = ModuleID::Anonymous379,
<...>
Flags: needinfo?(sguelton)
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a421248cbfa8 Fix HttpChannelOpenArgs padding r=necko-reviewers,valentin
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Flags: needinfo?(sguelton)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: