All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 74717] New: r600g: 'invalid read' linking geometry shader
Date: Sat, 08 Feb 2014 17:49:07 +0000	[thread overview]
Message-ID: <bug-74717-502@http.bugs.freedesktop.org/> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 5710 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=74717

          Priority: medium
            Bug ID: 74717
                CC: airlied@freedesktop.org
          Assignee: dri-devel@lists.freedesktop.org
           Summary: r600g: 'invalid read' linking geometry shader
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: edwin+mesa@etorok.net
          Hardware: Other
            Status: NEW
           Version: git
         Component: Drivers/Gallium/r600
           Product: Mesa

Created attachment 93669
  --> https://bugs.freedesktop.org/attachment.cgi?id=93669&action=edit
gl-320-primitive-shading.trace

I am happy that r600g gained OpenGL 3.3 support in Mesa, so I tested a few
geometry shader samples.

gl-320-primitive-shading either segfaults or prints error messages when run.
According to valgrind there is an invalid read when linking the shader. I have
reproduced the invalid read with glretrace too (see attachment).

Kernel is 3.14.0-rc1 + merge of 7c4c62a04a2a80e3feb5d6c97aca1e413b11c790 from
drm-fixes:
$ uname -a
Linux debian 3.14.0-rc1-00015-g7c4c62a #48 SMP PREEMPT Sat Feb 8 17:33:48 EET
2014 x86_64 GNU/Linux

Mesa is from the 10.1 branch:
$ glxinfo |grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.0-rc1
(git-1e6bba5)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.1.0-rc1 (git-1e6bba5)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

Hardware is a Radeon HD 4650:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV730
PRO [Radeon HD 4650] (prog-if 00 [VGA controller])

To reproduce using the source code:
$ git clone https://github.com/g-truc/ogl-samples
$ cmake .
$ make 
$ build/build/release/gl-320-primitive-shading

The relevant source files:
https://github.com/g-truc/ogl-samples/blob/master/samples/gl-320-primitive-shading.cpp
https://github.com/g-truc/ogl-samples/blob/master/data/gl-320/primitive-shading.frag
https://github.com/g-truc/ogl-samples/blob/master/data/gl-320/primitive-shading.geom
https://github.com/g-truc/ogl-samples/blob/master/data/gl-320/primitive-shading.vert

Running 'valgrind glretrace gl-320-primitive-shading.trace' shows:
==10728== Memcheck, a memory error detector
==10728== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==10728== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==10728== Command: glretrace gl-320-primitive-shading.trace
==10728== 
==10728== Invalid read of size 8
==10728==    at 0x58131A0: glsl_to_tgsi_visitor::copy_propagate()
(st_glsl_to_tgsi.cpp:3447)
==10728==    by 0x581AE1F: st_link_shader (st_glsl_to_tgsi.cpp:5126)
==10728==    by 0x582EDD9: _mesa_glsl_link_shader (ir_to_mesa.cpp:3091)
==10728==    by 0x577E729: link_program (shaderapi.c:872)
==10728==    by 0x47D8B3: _glLinkProgram(unsigned int) (in
/usr/local/bin/glretrace)
==10728==    by 0x4E7411: retrace_glLinkProgram(trace::Call&) (in
/usr/local/bin/glretrace)
==10728==    by 0x429EDC: retrace::Retracer::retrace(trace::Call&) (in
/usr/local/bin/glretrace)
==10728==    by 0x41F7F8: retrace::retraceCall(trace::Call*) (in
/usr/local/bin/glretrace)
==10728==    by 0x421681: retrace::RelayRunner::runLeg(trace::Call*) (in
/usr/local/bin/glretrace)
==10728==    by 0x421573: retrace::RelayRunner::runRace() (in
/usr/local/bin/glretrace)
==10728==    by 0x41FB49: retrace::RelayRace::run() (in
/usr/local/bin/glretrace)
==10728==    by 0x41FD18: retrace::mainLoop() (in /usr/local/bin/glretrace)
==10728==  Address 0x8517a88 is not stack'd, malloc'd or (recently) free'd
==10728== 
==10728== Invalid read of size 8
==10728==    at 0x58131B6: glsl_to_tgsi_visitor::copy_propagate()
(st_glsl_to_tgsi.cpp:3459)
==10728==    by 0x581AE1F: st_link_shader (st_glsl_to_tgsi.cpp:5126)
==10728==    by 0x582EDD9: _mesa_glsl_link_shader (ir_to_mesa.cpp:3091)
==10728==    by 0x577E729: link_program (shaderapi.c:872)
==10728==    by 0x47D8B3: _glLinkProgram(unsigned int) (in
/usr/local/bin/glretrace)
==10728==    by 0x4E7411: retrace_glLinkProgram(trace::Call&) (in
/usr/local/bin/glretrace)
==10728==    by 0x429EDC: retrace::Retracer::retrace(trace::Call&) (in
/usr/local/bin/glretrace)
==10728==    by 0x41F7F8: retrace::retraceCall(trace::Call*) (in
/usr/local/bin/glretrace)
==10728==    by 0x421681: retrace::RelayRunner::runLeg(trace::Call*) (in
/usr/local/bin/glretrace)
==10728==    by 0x421573: retrace::RelayRunner::runRace() (in
/usr/local/bin/glretrace)
==10728==    by 0x41FB49: retrace::RelayRace::run() (in
/usr/local/bin/glretrace)
==10728==    by 0x41FD18: retrace::mainLoop() (in /usr/local/bin/glretrace)
==10728==  Address 0x188 is not stack'd, malloc'd or (recently) free'd
==10728== 
apitrace: warning: caught signal 11
5394: error: caught an unhandled exception

Running it without valgrind shows this:
$ glretrace gl-320-primitive-shading.trace
EE r600_shader.c:345 tgsi_is_supported - unsupported src 0 (dimension 1)
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed !
EE r600_state_common.c:745 r600_shader_select - Failed to build shader variant
(type=2) -22
EE r600_shader.c:345 tgsi_is_supported - unsupported src 0 (dimension 1)
EE r600_shader.c:157 r600_pipe_shader_create - translation from TGSI failed !
EE r600_state_common.c:745 r600_shader_select - Failed to build shader variant
(type=2) -22

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 7692 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2014-02-08 17:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 17:49 bugzilla-daemon [this message]
2014-02-08 19:32 ` [Bug 74717] r600g: 'invalid read' linking geometry shader bugzilla-daemon
2014-02-08 22:03 ` bugzilla-daemon
2014-02-09 13:33 ` bugzilla-daemon
2014-02-09 14:05 ` bugzilla-daemon
2014-02-09 14:08 ` bugzilla-daemon
2014-02-09 14:55 ` bugzilla-daemon
2014-02-10  8:12 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-74717-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.