"Conditional jump or move depends on uninitialised value(s)" in ThebesLayerOGL::EnsureSurface()

RESOLVED FIXED in mozilla2.0b1

Status

()

Core
Graphics
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: cjones, Assigned: romaxa)

Tracking

({valgrind})

unspecified
mozilla2.0b1
x86
Linux
valgrind
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

|mOffscreenSize| is never initialized.


==27630== Conditional jump or move depends on uninitialised value(s)
==27630==    at 0x6341996: gfxIntSize::operator==(gfxIntSize const&) const (gfxPoint.h:58)
==27630==    by 0x6DCAA36: mozilla::layers::ThebesLayerOGL::EnsureSurface() (ThebesLayerOGL.cpp:105)
==27630==    by 0x6DCAF34: mozilla::layers::ThebesLayerOGL::RenderLayer(int, nsIntPoint const&) (ThebesLayerOGL.cpp:181)
==27630==    by 0x6DC1886: mozilla::layers::ContainerLayerOGL::RenderLayer(int, nsIntPoint const&) (ContainerLayerOGL.cpp:178)
==27630==    by 0x6DC1886: mozilla::layers::ContainerLayerOGL::RenderLayer(int, nsIntPoint const&) (ContainerLayerOGL.cpp:178)
==27630==    by 0x6DC70F7: mozilla::layers::LayerManagerOGL::Render() (LayerManagerOGL.cpp:408)
==27630==    by 0x6DC6B4F: mozilla::layers::LayerManagerOGL::EndTransaction(void (*)(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*), void*) (LayerManagerOGL.cpp:300)
==27630==    by 0x592C337: nsDisplayList::PaintForFrame(nsDisplayListBuilder*, nsIRenderingContext*, nsIFrame*, unsigned int) const (nsDisplayList.cpp:401)
==27630==    by 0x592BF31: nsDisplayList::PaintRoot(nsDisplayListBuilder*, nsIRenderingContext*, unsigned int) const (nsDisplayList.cpp:342)
==27630==    by 0x5959B7B: nsLayoutUtils::PaintFrame(nsIRenderingContext*, nsIFrame*, nsRegion const&, unsigned int, unsigned int) (nsLayoutUtils.cpp:1342)
==27630==    by 0x59820C7: PresShell::Paint(nsIView*, nsIView*, nsIWidget*, nsRegion const&, int, int) (nsPresShell.cpp:5882)
==27630==    by 0x5F6F644: nsViewManager::RenderViews(nsView*, nsIWidget*, nsRegion const&) (nsViewManager.cpp:428)
==27630==    by 0x5F6F4D7: nsViewManager::Refresh(nsView*, nsIWidget*, nsIntRegion const&, unsigned int) (nsViewManager.cpp:401)
==27630==    by 0x5F70807: nsViewManager::DispatchEvent(nsGUIEvent*, nsIView*, nsEventStatus*) (nsViewManager.cpp:795)
==27630==    by 0x5F6AE09: HandleEvent(nsGUIEvent*) (nsView.cpp:160)
==27630==    by 0x6950F9F: nsWindow::DispatchEvent(nsGUIEvent*, nsEventStatus&) (nsWindow.cpp:589)
==27630==    by 0x6955758: nsWindow::OnExposeEvent(_GtkWidget*, _GdkEventExpose*) (nsWindow.cpp:2370)
==27630==    by 0x695EC39: expose_event_cb(_GtkWidget*, _GdkEventExpose*) (nsWindow.cpp:5727)
==27630==    by 0x98BE0E7: _gtk_marshal_BOOLEAN__BOXED (gtkmarshalers.c:84)
==27630==    by 0xB5075DD: g_closure_invoke (gclosure.c:767)
==27630==    by 0xB51B597: signal_emit_unlocked_R (gsignal.c:3248)
==27630==    by 0xB51C8B8: g_signal_emit_valist (gsignal.c:2991)
==27630==    by 0xB51D032: g_signal_emit (gsignal.c:3038)
==27630==    by 0x99D502E: gtk_widget_event_internal (gtkwidget.c:4951)
==27630==    by 0x98B7810: gtk_main_do_event (gtkmain.c:1583)
==27630==    by 0xA99A949: _gdk_window_process_updates_recurse (gdkwindow.c:5181)
==27630==    by 0xA9973DA: gdk_window_process_updates_internal (gdkwindow.c:5340)
==27630==    by 0xA999250: gdk_window_process_all_updates (gdkwindow.c:5448)
==27630==    by 0xA9992B8: gdk_window_update_idle (gdkwindow.c:5074)
==27630==    by 0xA975DB5: gdk_threads_dispatch (gdk.c:512)
(Assignee)

Comment 1

8 years ago
Created attachment 453973 [details] [diff] [review]
Init gfxIntSize

Oh, I thought that gfxIntSize default constructor initializing internal width and height values...
Attachment #453973 - Flags: review?(jones.chris.g)
Comment on attachment 453973 [details] [diff] [review]
Init gfxIntSize

Yeah, I just recently learned that while fixing bug 573894 :/.

>diff -r e6008f023c11 gfx/layers/opengl/ThebesLayerOGL.cpp
>--- a/gfx/layers/opengl/ThebesLayerOGL.cpp
>+++ b/gfx/layers/opengl/ThebesLayerOGL.cpp
>@@ -73,16 +73,17 @@ UseOpaqueSurface(Layer* aLayer)
> }
> 
> 
> ThebesLayerOGL::ThebesLayerOGL(LayerManagerOGL *aManager)
>   : ThebesLayer(aManager, NULL)
>   , LayerOGL(aManager)
>   , mTexture(0)
>   , mOffscreenFormat(gfxASurface::ImageFormatUnknown)
>+  , mOffscreenSize(0,0)

IMHO (-1, -1) is a better sentry value in general, if you're looking to form good habits, but it doesn't matter here.
Attachment #453973 - Flags: review?(jones.chris.g) → review+
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
(Assignee)

Comment 3

8 years ago
http://hg.mozilla.org/mozilla-central/rev/00126f75e4b4
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Keywords: checkin-needed
Target Milestone: --- → mozilla1.9.3a6
You need to log in before you can comment on or make changes to this bug.