Closed Bug 1635990 Opened 6 months ago Closed 6 months ago

TEST-UNEXPECTED-FAIL | valgrind-test | 29 bytes in 1 blocks are definitely lost at malloc / g_malloc / g_strdup / value_lcopy_string

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

When upgrading builders to Debian 8, which upgrades Gtk+3 to 3.14 instead of 3.10, we get the following leak:

[task 2020-05-06T11:40:47.367Z] 11:40:47     INFO -  24:49.61 ==17372== 29 bytes in 1 blocks are definitely lost in loss record 2,933 of 9,392
[task 2020-05-06T11:40:47.367Z] 11:40:47     INFO -  24:49.61 ==17372==    at 0x4C28FC0: malloc+112 (vg_replace_malloc.c:307)
[task 2020-05-06T11:40:47.368Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xA33B859: g_malloc+25 (gmem.c:97)
[task 2020-05-06T11:40:47.368Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xA35413E: g_strdup+30 (gstrfuncs.c:356)
[task 2020-05-06T11:40:47.368Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xA0D1F0C: value_lcopy_string+44 (gvaluetypes.c:312)
[task 2020-05-06T11:40:47.368Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xA0B1129: g_object_get_valist+409 (gobject.c:2228)
[task 2020-05-06T11:40:47.368Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xA0B158B: g_object_get+235 (gobject.c:2316)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112BFF23: GetGtkHeaderBarButtonLayout(WidgetNodeType*, int, bool*)+83 (checkouts/gecko/widget/gtk/gtk3drawing.cpp:406)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112E0453: nsLookAndFeel::EnsureInit()+5539 (checkouts/gecko/widget/gtk/nsLookAndFeel.cpp:1287)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112E0826: nsLookAndFeel::NativeGetColor(mozilla::StyleSystemColor, unsigned int&)+22 (checkouts/gecko/widget/gtk/nsLookAndFeel.cpp:320)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x11287978: nsXPLookAndFeel::GetColorImpl(mozilla::StyleSystemColor, bool, unsigned int&)+344 (checkouts/gecko/widget/nsXPLookAndFeel.cpp:913)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112A736E: mozilla::widget::SelectionStyleProvider::OnThemeChanged()+94 (checkouts/gecko/widget/gtk/IMContextWrapper.cpp:270)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112A243F: SelectionStyleProvider (checkouts/gecko/widget/gtk/IMContextWrapper.cpp:307)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112A243F: GetInstance (checkouts/gecko/widget/gtk/IMContextWrapper.cpp:233)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x112A243F: mozilla::widget::IMContextWrapper::Init()+127 (checkouts/gecko/widget/gtk/IMContextWrapper.cpp:444)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1129B42D: nsWindow::Create(nsIWidget*, void*, mozilla::gfx::IntRectTyped<mozilla::LayoutDevicePixel> const&, nsWidgetInitData*)+4909 (checkouts/gecko/widget/gtk/nsWindow.cpp:4570)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1125471E: nsIWidget::Create(nsIWidget*, void*, mozilla::gfx::IntRectTyped<mozilla::DesktopPixel> const&, nsWidgetInitData*)+302 (dist/include/nsIWidget.h:460)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1211EAE4: mozilla::AppWindow::Initialize(nsIAppWindow*, nsIAppWindow*, int, int, bool, nsWidgetInitData&)+644 (checkouts/gecko/xpfe/appshell/AppWindow.cpp:221)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x12128C8E: nsAppShellService::JustCreateTopWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, bool, mozilla::AppWindow**)+798 (checkouts/gecko/xpfe/appshell/nsAppShellService.cpp:677)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x12129127: nsAppShellService::CreateTopLevelWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, nsIAppWindow**)+103 (checkouts/gecko/xpfe/appshell/nsAppShellService.cpp:172)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1238E024: nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIOpenWindowInfo*, bool*, nsIWebBrowserChrome**)+484 (checkouts/gecko/toolkit/components/startup/nsAppStartup.cpp:632)
[task 2020-05-06T11:40:47.369Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1240FA6D: CreateChromeWindow (checkouts/gecko/toolkit/components/windowwatcher/nsWindowWatcher.cpp:418)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1240FA6D: nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, bool, bool, bool, nsDocShellLoadState*, mozilla::dom::BrowsingContext**)+3997 (checkouts/gecko/toolkit/components/windowwatcher/nsWindowWatcher.cpp:940)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1240E926: nsWindowWatcher::OpenWindow(mozIDOMWindowProxy*, char const*, char const*, char const*, nsISupports*, mozIDOMWindowProxy**)+150 (checkouts/gecko/toolkit/components/windowwatcher/nsWindowWatcher.cpp:293)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xEBC8381: ??? (xptcinvoke_asm_x86_64_unix.S:106)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xF4DF4A9: Invoke (checkouts/gecko/js/xpconnect/src/XPCWrappedNative.cpp:1632)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xF4DF4A9: Call (checkouts/gecko/js/xpconnect/src/XPCWrappedNative.cpp:1175)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xF4DF4A9: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)+3801 (checkouts/gecko/js/xpconnect/src/XPCWrappedNative.cpp:1141)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xF4E09F8: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)+616 (checkouts/gecko/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:946)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x12520F2A: CallJSNative (checkouts/gecko/js/src/vm/Interpreter.cpp:493)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x12520F2A: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)+874 (checkouts/gecko/js/src/vm/Interpreter.cpp:585)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1251A458: InternalCall (checkouts/gecko/js/src/vm/Interpreter.cpp:648)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1251A458: CallFromStack (checkouts/gecko/js/src/vm/Interpreter.cpp:652)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1251A458: Interpret(JSContext*, js::RunState&)+36856 (checkouts/gecko/js/src/vm/Interpreter.cpp:3321)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x125112F3: js::RunScript(JSContext*, js::RunState&)+291 (checkouts/gecko/js/src/vm/Interpreter.cpp:465)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x12521488: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)+2248 (checkouts/gecko/js/src/vm/Interpreter.cpp:620)
[task 2020-05-06T11:40:47.371Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x125219A4: InternalCall (checkouts/gecko/js/src/vm/Interpreter.cpp:648)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x125219A4: js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)+180 (checkouts/gecko/js/src/vm/Interpreter.cpp:665)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x1259E30E: JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)+654 (checkouts/gecko/js/src/jsapi.cpp:2777)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xF4DAD37: nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*)+2391 (checkouts/gecko/js/xpconnect/src/XPCWrappedJSClass.cpp:964)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xEBC90CB: PrepareAndDispatch+539 (checkouts/gecko/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:125)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0xEBC8506: SharedStub+90 (in /builds/worker/workspace/obj-build/toolkit/library/build/libxul.so)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x122DCF05: nsCommandLine::EnumerateHandlers(nsresult (*)(nsICommandLineHandler*, nsICommandLine*, void*), void*)+453 (checkouts/gecko/toolkit/components/commandlines/nsCommandLine.cpp:448)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x122DD3AA: nsCommandLine::Run()+58 (checkouts/gecko/toolkit/components/commandlines/nsCommandLine.cpp:503)
[task 2020-05-06T11:40:47.372Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x124556DE: XREMain::XRE_mainRun()+2206 (checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4536)
[task 2020-05-06T11:40:47.373Z] 11:40:47     INFO -  24:49.61 ==17372==    by 0x124561D5: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)+1189 (checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4750)
[task 2020-05-06T11:40:47.373Z] 11:40:47     INFO -  24:49.61 ==17372==

For the record, I audited all the uses of g_object_get, this was the only one affected.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/a86b8ebd5a3e
Fix leak when gtk-decoration-layout setting is set. r=karlt
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.