lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] 'wine test_coding_rules.exe' segfault


From: Greg Chicares
Subject: [lmi] 'wine test_coding_rules.exe' segfault
Date: Fri, 15 May 2020 17:18:07 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

To reproduce: build lmi with gcc_i686-w64-mingw32 version 9.3, then:

/opt/lmi/src/lmi[0]$make check_concinnity                                       
              
make[1]: Entering directory '/opt/lmi/src/lmi'
make[2]: 'test_coding_rules.exe' is up to date.
make[1]: Leaving directory '/opt/lmi/src/lmi'
  Problems detected by xmllint:
  Miscellaneous problems:
Segmentation fault
make: [GNUmakefile:467: check_concinnity] Error 139 (ignored)

OTOH, it works (no segfault) with gcc-8.3 .

The line number "GNUmakefile:467" is inexact; the segfault really
occurs a few lines later, on this line:
    @-$(PERFORM) $(TEST_CODING_RULES) $(prefascicle_dir)/*
and can be reproduced in isolation thus:

/opt/lmi/src/lmi[0]$wine 
/opt/lmi/gcc_i686-w64-mingw32/build/ship/test_coding_rules.exe 
/opt/lmi/src/lmi/*   
zsh: segmentation fault  wine 
/opt/lmi/gcc_i686-w64-mingw32/build/ship/test_coding_rules.exe 

Curiously, passing the '/*' expansion into xargs as a single
undivided lump avoids the segfault:

/opt/lmi/src/lmi[0]$echo * | xargs wine /opt/lmi/bin/test_coding_rules.exe
      658 source files
   184005 source lines
      346 marked defects

as does passing something closely resembling the original
argument list, constructed with 'find':

/opt/lmi/src/lmi[0]$find ./ -maxdepth 1 -type f -name '[!.]*' | xargs wine 
/opt/lmi/bin/test_coding_rules.exe
      658 source files
   184005 source lines
      346 marked defects

but that fails with a subshell:

/opt/lmi/src/lmi[0]$dash -c find ./ -maxdepth 1 -type f -name '[!.]*' | xargs 
wine /opt/lmi/bin/test_coding_rules.exe
xargs: wine: terminated by signal 11
/opt/lmi/src/lmi[125]$zsh -c find ./ -maxdepth 1 -type f -name '[!.]*' | xargs 
wine /opt/lmi/bin/test_coding_rules.exe
xargs: wine: terminated by signal 11

and none of those tricks suggests a 'GNUmakefile' change that actually
works, perhaps because 'make' runs all commands through a shell.

BTW, the argument list generated with 'find' is shorter than the
expansion of '*':

/opt/lmi/src/lmi[0]$find . -maxdepth 1 -type f | wc
    775     775   15590
/opt/lmi/src/lmi[0]$echo * |wc                            
      1     782   14079

Maybe the solution to this problem is to redesign 'test_coding_rules'
to accept a directory argument, and distinguish it from a file list.
Vadim--any other ideas?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]