Bug 14157

Summary: Valgrind uninitialised value(s) in i915_dri.so
Product: Mesa Reporter: Bernd Buschinski <b.buschinski>
Component: Drivers/DRI/i915Assignee: Zou Nan hai <nanhai.zou>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: michael.fu
Version: unspecifiedKeywords: NEEDINFO
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: brabbit003
valgrind debug output

Description Bernd Buschinski 2008-01-20 14:27:18 UTC
Created attachment 13824 [details]
brabbit003

I played with Qt and created a little game (attached),
I was curious about memleaks so run valgrind, but rather then finding memleaks(only one in my little game) I got:

Conditional jump or move depends on uninitialised value(s)
1   at 0xB1DD4F2: intelCopyBuffer (in /usr/lib64/dri/i915_dri.so)
2   by 0xB1DE7D5: intelSwapBuffers (in /usr/lib64/dri/i915_dri.so)
3   by 0xB1C7204: (within /usr/lib64/dri/i915_dri.so)
4   by 0x4E5DE8C: QOpenGLPaintEngine::end() (in /usr/lib64/qt4/libQtOpenGL.so.4.3.3)
5   by 0x57EED1E: QPainter::end() (in /usr/lib64/qt4/libQtGui.so.4.3.3)
6   by 0x406AFF:  BRender::update() (brender.cpp:112)
7   by 0x405856:  BMainGLWidget::paintEvent(QPaintEvent*) (bmainglwidget.cpp:72)
8   by 0x5768217: QWidget::event(QEvent*) (in /usr/lib64/qt4/libQtGui.so.4.3.3)
9   by 0x4E694D6: QOGLWidget::event(QEvent*) (in /usr/lib64/qt4/libQtOpenGL.so.4.3.3)
10  by 0x5722833: QApplicationPrivate::notify_helper(QObject*,QEvent*) (in /usr/lib64/qt4/libQtGui.so.4.3.3)
11  by 0x5723C96: QApplication::notify(QObject*,QEvent*) (in /usr/lib64/qt4/libQtGui.so.4.3.3)
12  by 0x7F886A1: QCoreApplication::notifyInteral(QObject*,QEvent*) (in /usr/lib64/qt4/libQtCore.so.4.3.3)

and 

Conditional jump or move depends on uninitialised value(s)
1   at 0xB1DFB0E: intelRefillBatchLocked (in /usr/lib64/dri/i915_dri.so)
2   by 0xB1E0090: intelFlushBatchLocked (in /usr/lib64/dri/i915_dri.so)
3   by 0xB1E04C2: intelFlushBatch (in /usr/lib64/dri/i915_dri.so)
4   by 0xB1E06A4: intelWaitForIdle (in /usr/lib64/dri/i915_dri.so)
5   by 0xB1E8099: intelUploadTexImages (in /usr/lib64/dri/i915_dri.so)
6   by 0xB1D3639: i915UpdateTexturesState  (in /usr/lib64/dri/i915_dri.so)
7   by 0xB1F31FA: (within /usr/lib64/dri/i915_dri.so)
8   by 0xB279722: _tnl_draw_prims (in /usr/lib64/dri/i915_dri.so)
9   by 0xB2723C5: (within /usr/lib64/dri/i915_dri.so)
10  by 0x4E4C631: QOpenGLPaintEngine::drawTextureRect(int,int,QRectF const&, QRectF const& unsigned) (in /usr/lib64/qt4/libQtOpenGL.so.4.3.3)
11  by 0x4E5ACEF: QOpenGLPaintEngine::drawPixmap(QRectF const&,QPixmap const&, QRectF const&) (in /usr/lib64/qt4/libQtOpenGL.so.4.3.3)
12  by 0x57F62AD: QPainter::drawPixmap(QRectF const&,QPixmap const&, QRectF const&) (in /usr/lib64/qt4/libQtGui.so.4.3.3)

which could led to unexpected behavior. My drivers arent build with debug symbols, and currently cant risk to break them( in about 2 weeks I have time for it). I could not find the uninitialised value(s) myself, so I am writing this report.

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
in the Apple MacBook

qt-4.3.3
mesa-7.0.2
xf86-video-intel-2.2.0
xorg-server-1.4.0.90
kernel-2.6.23.7

game requieres at least qt-4.2(I hope) with opengl support
Comment 1 Bernd Buschinski 2008-02-05 14:35:52 UTC
Created attachment 14161 [details]
valgrind debug output

I finally compiled it with debug mesa and driver, but it didnt helped me.
It rather confused me, maybe it helps you devs more :)

in intelRefillBatchLocked case
line 127:    GLuint last_irq = intel->alloc.irq_emitted;
and 
line 133:   if (last_irq) {
last_irq is reported as uninitialised value?
Comment 2 Johan Bilien 2008-02-05 23:47:01 UTC
(In reply to comment #1)

> I finally compiled it with debug mesa and driver, but it didnt helped me.
> It rather confused me, maybe it helps you devs more :)
> 
> in intelRefillBatchLocked case
> line 127:    GLuint last_irq = intel->alloc.irq_emitted;
> and 
> line 133:   if (last_irq) {
> last_irq is reported as uninitialised value?

If intel->alloc.irq_emitted is not initialized then last_irq will be marked as uninitialized as well.
Comment 3 Zou Nan hai 2008-02-19 00:23:19 UTC
Bernd,
     Those functions no longer exist in latest mesa tree.
Could you check with the latest mesa again?

Comment 4 Bernd Buschinski 2008-04-18 08:08:25 UTC
Sorry for the late response but it is fixed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.