Bug 79616

Summary: L4D2 crash on startup
Product: Mesa Reporter: Tapani Pälli <lemody>
Component: Drivers/DRI/i965Assignee: Tapani Pälli <lemody>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: idr, mattst88
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: hopeful fix

Description Tapani Pälli 2014-06-04 05:07:20 UTC
L4D2 crashes with current Mesa master, I'm getting:

---- 8< ---
hl2_linux: intel_mipmap_tree.c:1881: intel_miptree_map_movntdqa: Assertion `(((uintptr_t) map->ptr) & 15) == misalignment' failed.
---- 8< ---

I bisected this to the following commit:

commit f935dfc022f2481b3ed6ecfccafef37ce71776f0
Author: Matt Atwood <matthew.s.atwood@intel.com>
Date:   Fri May 2 09:44:45 2014 -0700

    i965: Use SSE4.1 runtime detection for intel_miptree_map.
    
    Previous it was a compile-time decision.
    
    Reviewed-by: Matt Turner <mattst88@gmail.com>
Comment 1 Tapani Pälli 2014-06-04 05:11:19 UTC
Reproduced this on IVB ultrabook and HSW brixbox.
Comment 2 Tapani Pälli 2014-06-04 07:17:16 UTC
Created attachment 100388 [details] [review]
hopeful fix

this fixes the issue for me, I'd like Matt to verify if this fix is correct.
Comment 3 Ian Romanick 2014-06-04 16:16:55 UTC
I think that patch is correct.  It seems like it's just luck that malloc works at all.  I don't think there's any guarantee that it will provide better than sizeof(void*) alignment.  For allocations smaller than sizeof(void*), it won't even do that.  Consider that my Reviewed-by.

I'd still wait to hear from Matt.
Comment 4 Tapani Pälli 2014-06-05 06:02:54 UTC
pushed to master

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.