Bug 72281 - [bisected] Eufloria HD crash on start
Summary: [bisected] Eufloria HD crash on start
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-12-03 19:56 UTC by Pavel Ondračka
Modified: 2014-04-18 05:36 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Pavel Ondračka 2013-12-03 19:56:37 UTC
Eufloria HD crash on start here with all tested drivers (llvmpipe, softpipe, r300g). This is a regression introduced by:

e5885c119de1e508099cc1111e1c9f8ff00fab88 is the first bad commit
commit e5885c119de1e508099cc1111e1c9f8ff00fab88
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Sep 20 10:13:32 2013 -0700

    mesa: Dynamically allocate the storage for program local parameters.
    
    The array was 64kb per struct gl_program, plus we statically stored a copy
    of one on disk for _mesa_DummyProgram.  Given that most struct gl_programs
    we generate are for GLSL shaders that don't have local parameters, this
    was a waste.
    
    Since you can store and fetch parameters beyond what the program actually
    uses, we do have to do a late allocation if necessary at
    GetProgramLocalParameter time.
    
    Reduces peak memory usage in the dota2 trace I made by 76MB (4.5%)
    
    Reviewed-by: Brian Paul <brianp@vmware.com>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>


Program received signal SIGSEGV, Segmentation fault.
__memcpy_ia32 () at ../sysdeps/i386/i686/memcpy.S:74
74		rep
#0  __memcpy_ia32 () at ../sysdeps/i386/i686/memcpy.S:74
#1  0x00000001 in ?? ()
#2  0xb6336a15 in _mesa_ProgramLocalParameters4fvEXT (target=34336, index=1, count=4, params=0x87c8f48) at main/arbprogram.c:551
#3  0x4e9b3dbc in ?? () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#4  0x4e9afc6a in ?? () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#5  0x4e9af055 in ?? () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#6  0x4e987702 in ?? () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#7  0x4e987819 in ?? () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#8  0x4e9899ee in cgGLLoadProgram () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#9  0x081e85f8 in Coal::Shader::LoadBinary(char const*) ()
#10 0x081e7a06 in Coal::Win32Renderer::LoadShaderBinary(char const*, bool) ()
#11 0x080e64dd in Drawing::Drawing() ()
#12 0x080fb7c4 in EufloriaApp::Initialise() ()
#13 0x081db653 in Coal::App::Run() ()
#14 0x081579a5 in main ()
Comment 1 Eero Tamminen 2013-12-18 14:42:37 UTC
(In reply to comment #0)
...
#8  0x4e9899ee in cgGLLoadProgram () from /usr/local/games/EufloriaHD/lib/libCgGL.so
#9  0x081e85f8 in Coal::Shader::LoadBinary(char const*) ()
> #10 0x081e7a06 in Coal::Win32Renderer::LoadShaderBinary(char const*, bool) ()

Does this happen only on Windows?
Comment 2 Pavel Ondračka 2013-12-18 15:35:33 UTC
(In reply to comment #1)
> (In reply to comment #0)
> ...
> #8  0x4e9899ee in cgGLLoadProgram () from
> /usr/local/games/EufloriaHD/lib/libCgGL.so
> #9  0x081e85f8 in Coal::Shader::LoadBinary(char const*) ()
> > #10 0x081e7a06 in Coal::Win32Renderer::LoadShaderBinary(char const*, bool) ()
> 
> Does this happen only on Windows?

Nope, this is on Linux of course.
Comment 3 Kenneth Graunke 2014-04-18 05:36:18 UTC
Eufloria HD works for me.  Presumably this was fixed by:

commit 05fbb021a6329add4b37c876c0621c1dcc3d4ef9
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sun Jan 5 20:03:00 2014 -0800

    mesa: Use get_local_param_pointer in glProgramLocalParameters4fvEXT().
    
    Using the get_local_param_pointer helper ensures that the LocalParams
    arrays have actually been allocated before attempting to use them.
    
    glProgramLocalParameters4fvEXT needs to do a bit of extra checking,
    but it can be simplified since the helper has already validated the
    target.
    
    Fixes crashes in programs that use Cg (for example, Awesomenauts,
    Rocketbirds: Hardboiled Chicken, and Tiny and Big: Grandpa's Leftovers)
    since commit e5885c119de1e508099cc1111e1c9f8ff00fab88
    (mesa: Dynamically allocate the storage for program local parameters.)
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73136
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Brian Paul <brianp@vmware.com>
    Tested-by: Laurent Carlier <lordheavym@gmail.com>


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.