FAIL: pcre-jitstack =================== ++ initial_cwd_=/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests ++ fail=0 +++ testdir_prefix_ +++ printf gt ++ pfx_=gt +++ mktempd_ /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests gt-pcre-jitstack.XXXX +++ case $# in +++ destdir_=/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests +++ template_=gt-pcre-jitstack.XXXX +++ MAX_TRIES_=4 +++ case $destdir_ in +++ case $template_ in ++++ unset TMPDIR +++ d=/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq +++ case $d in +++ test -d /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq ++++ tr S - ++++ LC_ALL=C ++++ env -- tr S - ++++ ls -dgo /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq +++ perms='drwx------ 2 4096 Dec 26 12:40 /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq' +++ case $perms in +++ test 0 = 0 +++ echo /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq +++ return ++ test_dir_=/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq ++ cd /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq ++ gl_init_sh_nl_=' ' ++ IFS=' ' ++ for sig_ in 1 2 3 13 15 +++ expr 1 + 128 ++ eval 'trap '\''Exit 129'\'' 1' +++ trap 'Exit 129' 1 ++ for sig_ in 1 2 3 13 15 +++ expr 2 + 128 ++ eval 'trap '\''Exit 130'\'' 2' +++ trap 'Exit 130' 2 ++ for sig_ in 1 2 3 13 15 +++ expr 3 + 128 ++ eval 'trap '\''Exit 131'\'' 3' +++ trap 'Exit 131' 3 ++ for sig_ in 1 2 3 13 15 +++ expr 13 + 128 ++ eval 'trap '\''Exit 141'\'' 13' +++ trap 'Exit 141' 13 ++ for sig_ in 1 2 3 13 15 +++ expr 15 + 128 ++ eval 'trap '\''Exit 143'\'' 15' +++ trap 'Exit 143' 15 ++ trap remove_tmp_ 0 + path_prepend_ ../src + test 1 '!=' 0 + path_dir_=../src + case $path_dir_ in + abs_path_dir_=/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/../src + case $abs_path_dir_ in + PATH=/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/../src:/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/src:/usr/lib/portage/python3.4/ebuild-helpers/xattr:/usr/lib/portage/python3.4/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3 + create_exe_shims_ /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/../src + case $EXEEXT in + return 0 + shift + test 0 '!=' 0 + export PATH + require_pcre_ + grep -P . + echo . . + compare /dev/null err + compare_dev_null_ /dev/null err + test 2 = 2 + test x/dev/null = x/dev/null + test -s err + return 0 + return 0 ++ echo + nl_base64=Cg== + test XCg== = XCg== + foo=foo + test Xfoo = Xfoo + fail=0 + base64 -d + test 0 -eq 0 + gzip -d pcrejit.txt + LC_ALL=C + grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt grep: internal PCRE error: -21 + test 2 '!=' 1 + ulimit -s unlimited + : + ulimit -s unlimited + LC_ALL=C + grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt grep: internal PCRE error: -21 + test 2 = 1 + fail=1 + Exit 1 + set +e + exit 1 + exit 1 + remove_tmp_ + __st=1 + cleanup_ + : + cd /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests + chmod -R u+rwx /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq + rm -rf /var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests/gt-pcre-jitstack.lUuq + exit 1 FAIL pcre-jitstack (exit status: 1) ... ============================================================================ Testsuite summary for GNU grep 2.22 ============================================================================ # TOTAL: 95 # PASS: 88 # SKIP: 4 # XFAIL: 2 # FAIL: 1 # XPASS: 0 # ERROR: 0 ============================================================================ See tests/test-suite.log Please report to bug-grep@gnu.org ============================================================================ Makefile:1685: recipe for target 'test-suite.log' failed make[3]: *** [test-suite.log] Error 1 make[3]: Leaving directory '/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests' Makefile:1791: recipe for target 'check-TESTS' failed make[2]: *** [check-TESTS] Error 2 make[2]: Leaving directory '/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests' Makefile:2522: recipe for target 'check-am' failed make[1]: *** [check-am] Error 2 make[1]: Leaving directory '/var/tmp/portage/sys-apps/grep-2.22/work/grep-2.22/tests' Makefile:1277: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1 * ERROR: sys-apps/grep-2.22::gentoo failed (test phase): * Make check failed. See above for details. * * Call stack: * ebuild.sh, line 90: Called src_test * environment, line 2238: Called default * phase-functions.sh, line 763: Called default_src_test * phase-functions.sh, line 792: Called __eapi0_src_test * phase-helpers.sh, line 760: Called die * The specific snippet of code: * $emake_cmd ${internal_opts} check || \ * die "Make check failed. See above for details."
Created attachment 420882 [details] build.log
localhost ~ # emerge --info '=sys-apps/grep-2.22::gentoo' Portage 2.2.24 (python 3.4.3-final-0, hardened/linux/amd64, gcc-4.9.3, glibc-2.21-r1, 4.1.7-hardened-r1 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.1.7-hardened-r1-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.2 KiB Mem: 1874040 total, 1679460 free KiB Swap: 0 total, 0 free sh bash 4.3_p39 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p39::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.10-r1::gentoo, 3.4.3::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.18.4::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 justify mmx mmxext modules multilib ncurses nls nptl openmp pam pax_kernel pcre pie readline seccomp session sse sse2 ssl ssp tcpd unicode urandom xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON localhost ~ # emerge -pqv '=sys-apps/grep-2.22::gentoo' libpcre [ebuild R ] dev-libs/libpcre-8.38 USE="bzip2 cxx readline recursion-limit (unicode) zlib -jit -libedit -pcre16 -pcre32 -static-libs" ABI_X86="(64) -32 (-x32)" [ebuild U ] sys-apps/grep-2.22 [2.21-r1] USE="nls pcre -static" * IMPORTANT: 10 news items need reading for repository 'gentoo'. * Use eselect news read to view new items.
happens on non-hardened systems too for all libpcre versions in the tree, so doesn't look like a regression error 21 is: #define PCRE_ERROR_RECURSIONLIMIT (-21) and indeed this particular testcase exercises pcre heavily. while pcre shouldn't fail, sometimes regexes are too expensive to be able to execute. in this case, we probably want to skip this test when the pcre jit isn't available.
*** Bug 584074 has been marked as a duplicate of this bug. ***
*** Bug 584134 has been marked as a duplicate of this bug. ***
Created attachment 458950 [details, diff] Patch to skip pcre-jitstack test if sys-libs/libpcre is build without jit The test failure is not the fault of grep. It's the "fault" of libpcre. Attached a patch to skip the pcre-jitstack test. It consists of two parts: 1) A patch to the grep sources to skip the pcre-jitstack test, 2) A patch to grep-2.25.ebuild to apply 1) if sys-libs/libpcre is build without jit.
*** Bug 609412 has been marked as a duplicate of this bug. ***
This still holds true for grep-3.0
Same with 3.1 (on hppa).
Someone could test the patch posted upstream: https://lists.gnu.org/archive/html/bug-grep/2017-11/msg00015.html
(In reply to Matt Turner from comment #10) > Someone could test the patch posted upstream: > https://lists.gnu.org/archive/html/bug-grep/2017-11/msg00015.html fyi, this patch doesn't work: https://www.mail-archive.com/bug-grep@gnu.org/msg07068.html
*** Bug 675422 has been marked as a duplicate of this bug. ***
Same with 3.3-r1 on hppa without jit. Sparc worked with jit.
*** Bug 721354 has been marked as a duplicate of this bug. ***
*** Bug 744337 has been marked as a duplicate of this bug. ***
Same in 3.4 on hppa.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19c92a966c7f9b03da46dc047e4655e5e95aed30 commit 19c92a966c7f9b03da46dc047e4655e5e95aed30 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-03 23:56:43 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-03 23:57:07 +0000 sys-apps/grep: add 3.7_p20220425 (unkeyworded). Notably switches to libpcre2 (yay). Pre-release for testing. Bug: https://bugs.gentoo.org/514454 Bug: https://bugs.gentoo.org/569816 Bug: https://bugs.gentoo.org/641186 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/grep/Manifest | 2 + sys-apps/grep/grep-3.7_p20220425.ebuild | 72 +++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+)
grep-3.4 is gone from the Gentoo tree, so I think this issue can be closed.
(In reply to gentoo_usr from comment #18) > grep-3.4 is gone from the Gentoo tree, so I think this issue can be closed. Have you verified the issue no longer applies to newer greps?
> (In reply to gentoo_usr from comment #18) >> grep-3.4 is gone from the Gentoo tree, so I think this issue can be closed. > >Have you verified the issue no longer applies to newer greps? Yes, grep-3.7 passes its test suite.
(In reply to gentoo_usr from comment #20) > > (In reply to gentoo_usr from comment #18) > >> grep-3.4 is gone from the Gentoo tree, so I think this issue can be closed. > > > >Have you verified the issue no longer applies to newer greps? > > Yes, grep-3.7 passes its test suite. with libpcre[-jit]?
sys-apps/grep-3.7[pcre] passed tests here with dev-libs/libpcre-8.45-1[-jit]
(In reply to Sam James from comment #21) > (In reply to gentoo_usr from comment #20) > > > (In reply to gentoo_usr from comment #18) > > >> grep-3.4 is gone from the Gentoo tree, so I think this issue can be closed. > > > > > >Have you verified the issue no longer applies to newer greps? > > > > Yes, grep-3.7 passes its test suite. > > with libpcre[-jit]? Yes, sys-apps/grep with 'pcre' enabled and dev-libs/libpcre (and also dev-libs/libpcre2 fwiw) with 'jit' disabled.