Bug 1377201

Summary: [gcc-python-plugin] tests fail on secondary arches
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: gcc-python-pluginAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dan, dmalcolm
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-14 12:59:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 467765, 1071880    

Description Dan Horák 2016-09-19 07:43:32 UTC
Some tests fail on secondary arches (s390, ppc) during build.

for s390x, ppc64 it could be big endian related (http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2352447 and http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3722691)

from build.log
...
tests/cpychecker/absinterp/bitfields/reading: FAIL
returncode: 0
  compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/bitfields/reading/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/bitfields/reading/script.py -fsigned-char tests/cpychecker/absinterp/bitfields/reading/input.c
Stdout:
  Trace 0:
    Transitions:
      'when considering range: 0 <= value <= 0x2fffffff'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
      'taking False path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=43), value=2)
      str(): (int)2 from tests/cpychecker/absinterp/bitfields/reading/input.c:43
  
  Trace 1:
    Transitions:
      'when considering range: 0 <= value <= 0x2fffffff'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering range: 1 <= value <= 0x2000000'
      'taking True path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=41), value=1)
      str(): (int)1 from tests/cpychecker/absinterp/bitfields/reading/input.c:41
  
  Trace 2:
    Transitions:
      'when considering range: 0 <= value <= 0x2fffffff'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as NULL'
    error: NullPtrDereference()
    error: possibly dereferencing NULL (foo->a) at tests/cpychecker/absinterp/bitfields/reading/input.c:36
  
  Trace 3:
    Transitions:
      'when considering value == (unsigned int)0x30000000 from tests/cpychecker/absinterp/bitfields/reading/input.c:33'
      'taking True path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=34), value=0)
      str(): (int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:34
  
  Trace 4:
    Transitions:
      'when considering range: 0x30000001 <= value <= 0xf0000000'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
      'taking False path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=43), value=2)
      str(): (int)2 from tests/cpychecker/absinterp/bitfields/reading/input.c:43
  
  Trace 5:
    Transitions:
      'when considering range: 0x30000001 <= value <= 0xf0000000'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering range: 1 <= value <= 0x2000000'
      'taking True path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=41), value=1)
      str(): (int)1 from tests/cpychecker/absinterp/bitfields/reading/input.c:41
  
  Trace 6:
    Transitions:
      'when considering range: 0x30000001 <= value <= 0xf0000000'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as NULL'
    error: NullPtrDereference()
    error: possibly dereferencing NULL (foo->a) at tests/cpychecker/absinterp/bitfields/reading/input.c:36
Stderr:
--- Expected stdout (after cleaning)
+++ Actual stdout (after cleaning)
@@ -1,9 +1,9 @@
 Trace 0:
   Transitions:
-    'when considering range: 0 <= value <= 2'
+    'when considering range: 0 <= value <= 0x2fffffff'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
-    'when considering value == (unsigned char)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
+    'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
     'taking False path'
     'returning'
   Return value:
@@ -12,10 +12,10 @@
 
 Trace 1:
   Transitions:
-    'when considering range: 0 <= value <= 2'
+    'when considering range: 0 <= value <= 0x2fffffff'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
-    'when considering range: 1 <= value <= 64'
+    'when considering range: 1 <= value <= 0x2000000'
     'taking True path'
     'returning'
   Return value:
@@ -24,7 +24,7 @@
 
 Trace 2:
   Transitions:
-    'when considering range: 0 <= value <= 2'
+    'when considering range: 0 <= value <= 0x2fffffff'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as NULL'
   error: NullPtrDereference()
@@ -32,7 +32,7 @@
 
 Trace 3:
   Transitions:
-    'when considering value == (unsigned char)3 from tests/cpychecker/absinterp/bitfields/reading/input.c:33'
+    'when considering value == (unsigned int)0x30000000 from tests/cpychecker/absinterp/bitfields/reading/input.c:33'
     'taking True path'
     'returning'
   Return value:
@@ -41,10 +41,10 @@
 
 Trace 4:
   Transitions:
-    'when considering range: 4 <= value <= 15'
+    'when considering range: 0x30000001 <= value <= 0xf0000000'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
-    'when considering value == (unsigned char)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
+    'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
     'taking False path'
     'returning'
   Return value:
@@ -53,10 +53,10 @@
 
 Trace 5:
   Transitions:
-    'when considering range: 4 <= value <= 15'
+    'when considering range: 0x30000001 <= value <= 0xf0000000'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
-    'when considering range: 1 <= value <= 64'
+    'when considering range: 1 <= value <= 0x2000000'
     'taking True path'
     'returning'
   Return value:
@@ -65,7 +65,7 @@
 
 Trace 6:
   Transitions:
-    'when considering range: 4 <= value <= 15'
+    'when considering range: 0x30000001 <= value <= 0xf0000000'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as NULL'
   error: NullPtrDereference()
...


for ppc64le it's different (http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3722692)
...
tests/cpychecker/absinterp/bitfields/reading: FAIL
returncode: 0
  compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/bitfields/reading/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/bitfields/reading/script.py -fsigned-char tests/cpychecker/absinterp/bitfields/reading/input.c
Stdout:
  Trace 0:
    Transitions:
      'when considering range: 0 <= value <= 2'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
      'taking False path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=43), value=2)
      str(): (int)2 from tests/cpychecker/absinterp/bitfields/reading/input.c:43
  
  Trace 1:
    Transitions:
      'when considering range: 0 <= value <= 2'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering range: 1 <= value <= 64'
      'taking True path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=41), value=1)
      str(): (int)1 from tests/cpychecker/absinterp/bitfields/reading/input.c:41
  
  Trace 2:
    Transitions:
      'when considering range: 0 <= value <= 2'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as NULL'
    error: NullPtrDereference()
    error: possibly dereferencing NULL (foo->a) at tests/cpychecker/absinterp/bitfields/reading/input.c:36
  
  Trace 3:
    Transitions:
      'when considering value == (unsigned int)3 from tests/cpychecker/absinterp/bitfields/reading/input.c:33'
      'taking True path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=34), value=0)
      str(): (int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:34
  
  Trace 4:
    Transitions:
      'when considering range: 4 <= value <= 15'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
      'taking False path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=43), value=2)
      str(): (int)2 from tests/cpychecker/absinterp/bitfields/reading/input.c:43
  
  Trace 5:
    Transitions:
      'when considering range: 4 <= value <= 15'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
      'when considering range: 1 <= value <= 64'
      'taking True path'
      'returning'
    Return value:
      repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/bitfields/reading/input.c', line=41), value=1)
      str(): (int)1 from tests/cpychecker/absinterp/bitfields/reading/input.c:41
  
  Trace 6:
    Transitions:
      'when considering range: 4 <= value <= 15'
      'taking False path'
      'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as NULL'
    error: NullPtrDereference()
    error: possibly dereferencing NULL (foo->a) at tests/cpychecker/absinterp/bitfields/reading/input.c:36
Stderr:
--- Expected stdout (after cleaning)
+++ Actual stdout (after cleaning)
@@ -3,7 +3,7 @@
     'when considering range: 0 <= value <= 2'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
-    'when considering value == (unsigned char)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
+    'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
     'taking False path'
     'returning'
   Return value:
@@ -32,7 +32,7 @@
 
 Trace 3:
   Transitions:
-    'when considering value == (unsigned char)3 from tests/cpychecker/absinterp/bitfields/reading/input.c:33'
+    'when considering value == (unsigned int)3 from tests/cpychecker/absinterp/bitfields/reading/input.c:33'
     'taking True path'
     'returning'
   Return value:
@@ -44,7 +44,7 @@
     'when considering range: 4 <= value <= 15'
     'taking False path'
     'when treating unknown struct Foo * from tests/cpychecker/absinterp/bitfields/reading/input.c:31 as non-NULL'
-    'when considering value == (unsigned char)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
+    'when considering value == (unsigned int)0 from tests/cpychecker/absinterp/bitfields/reading/input.c:40'
     'taking False path'
     'returning'
   Return value:
...


Version-Release number of selected component (if applicable):
gcc-python-plugin-0.15-8.fc26

Comment 1 Fedora End Of Life 2017-02-28 10:19:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 2 Fedora End Of Life 2018-05-03 08:28:12 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 3 Dave Malcolm 2018-05-04 21:53:32 UTC
Sorry about the long delay on this.

The tests in question have bit-rotted against gcc 7 and later, so I've disabled them for gcc >= 7 upstream in gcc-python-plugin-0.16.

gcc-python-plugin-0.16-2.fc29 built here for primary archs:
  https://koji.fedoraproject.org/koji/taskinfo?taskID=26771915

Does this fix the issue on the secondary archs?

Comment 4 Dan Horák 2018-05-14 07:48:45 UTC
It does, there are no secondary arches from the build-system point of view and all per-arch builds (including ppc64/ppc64le and s390x) succeeded.