Bug 105052 - compiler/test_eu_compact failure with GCC 8
Summary: compiler/test_eu_compact failure with GCC 8
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-12 08:34 UTC by Vinson Lee
Modified: 2018-02-27 21:06 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-intel-ir-Fix-invalid-type-aliasing-with-undefined-be.patch (1.10 KB, patch)
2018-02-20 18:38 UTC, Francisco Jerez
Details | Splinter Review

Description Vinson Lee 2018-02-12 08:34:03 UTC
=================================================
   Mesa 18.1.0-devel: src/intel/test-suite.log
=================================================

# TOTAL: 27
# PASS:  25
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: compiler/test_eu_compact
==============================

Instruction compact/uncompact changed (gen6):
  before: add(8)          g0<1>F          g2<8,8,1>F      g0<8,1,0>F      { align1 1Q compacted };
  after:  add(8)          g0<1>F          g2<8,8,1>F      g0<8,1,0>F      { align1 1Q };
  changed bits:
  bit 121, set to unset
  bit 122, set to unset
  bit 123, set to unset
  bit 124, set to unset
  bit 125, set to unset
Instruction compact/uncompact changed (gen6):
  before: add(8)          g0<1>F          g2<4>F          g0<8>.xF        { align16 1Q compacted };
  after:  add(8)          g0<1>F          g2<4>F          g0<8>.xF        { align16 1Q };
  changed bits:
  bit 121, set to unset
  bit 122, set to unset
  bit 123, set to unset
  bit 124, set to unset
  bit 125, set to unset
test_eu_compact: compiler/brw_eu_compact.c:897: has_3src_unmapped_bits: Assertion `!brw_inst_bits(src, 127, 126) && !brw_inst_bits(src, 105, 105) && !brw_inst_bits(src, 84, 84) && !brw_inst_bits(src, 36, 35) && !brw_inst_bits(src, 7, 7)' failed.
FAIL compiler/test_eu_compact (exit status: 134)

FAIL: compiler/test_eu_compact
==============================

Instruction compact/uncompact changed (gen6):
  before: add(8)          g0<1>F          g2<8,8,1>F      g0<8,1,0>F      { align1 1Q compacted };
  after:  add(8)          g0<1>F          g2<8,8,1>F      g0<8,1,0>F      { align1 1Q };
  changed bits:
  bit 121, set to unset
  bit 122, set to unset
  bit 123, set to unset
  bit 124, set to unset
  bit 125, set to unset
Instruction compact/uncompact changed (gen6):
  before: add(8)          g0<1>F          g2<4>F          g0<8>.xF        { align16 1Q compacted };
  after:  add(8)          g0<1>F          g2<4>F          g0<8>.xF        { align16 1Q };
  changed bits:
  bit 121, set to unset
  bit 122, set to unset
  bit 123, set to unset
  bit 124, set to unset
  bit 125, set to unset
test_eu_compact: compiler/brw_eu_compact.c:897: has_3src_unmapped_bits: Assertion `!brw_inst_bits(src, 127, 126) && !brw_inst_bits(src, 105, 105) && !brw_inst_bits(src, 84, 84) && !brw_inst_bits(src, 36, 35) && !brw_inst_bits(src, 7, 7)' failed.
FAIL compiler/test_eu_compact (exit status: 134)
Comment 1 Matt Turner 2018-02-20 18:08:48 UTC
Bugs with unreleased versions of GCC cannot block a Mesa release.
Comment 2 Francisco Jerez 2018-02-20 18:38:51 UTC
Created attachment 137473 [details] [review]
0001-intel-ir-Fix-invalid-type-aliasing-with-undefined-be.patch

Does it go away with the attached patch? I had it in a branch that was making some unrelated changes which just happened to affect the order instructions are emitted by GCC in the test_fuzz_compact_instruction() function, causing the bit twiddling to be done after the clear_pad_bits() call which modifies the same data through a pointer of different type, leading to undefined behavior.  I had seen this happen on GCC 7.
Comment 3 Vinson Lee 2018-02-24 22:59:02 UTC
(In reply to Francisco Jerez from comment #2)
> Created attachment 137473 [details] [review] [review]
> 0001-intel-ir-Fix-invalid-type-aliasing-with-undefined-be.patch
> 
> Does it go away with the attached patch? I had it in a branch that was
> making some unrelated changes which just happened to affect the order
> instructions are emitted by GCC in the test_fuzz_compact_instruction()
> function, causing the bit twiddling to be done after the clear_pad_bits()
> call which modifies the same data through a pointer of different type,
> leading to undefined behavior.  I had seen this happen on GCC 7.

attachment 137473 [details] [review] fixes the test_eu_compact failure with GCC 8.

Tested-by: Vinson Lee <vlee@freedesktop.org>
Comment 4 Francisco Jerez 2018-02-27 21:06:15 UTC
Thanks, should be fixed in master now.


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.