🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #693

bug in sed 1.09

#693
From: trq
Date: Mon, 31 Aug 1992 09:41
43 lines
1822 bytes
The following script will cause sed to abort in re_compile_fastmap()
and dump core.  It appears that the 'on_failure_keep_string_jump'
opcode is not handled by the switch in re_compile_fastmap().

This is GNU sed version 1.09 compiled with GCC version 2.2.2 on a
Sparcstation ELC running SunOS 4.1.1.

The sed command:
        ./sed -n                \
        -e '/^\.c\.o:.*;/{'             \
        -e    's/\$\*\.c//'             \
        -e    's/^[^;]*;[        ]*//p' \
        -e    q                         \
        -e '}'                          \
        -e '/^\.c\.o: *$/{'             \
        -e    N                         \
        -e    's/\$\*\.c//'             \
        -e    's/^.*\n[  ]*//p'         \
        -e    q                         \
        -e '}' < mf
and the file "mf" contains:
.c.o:
	$(CCCMD) $*.c
The following is a suggested patch:
===================================================================
RCS file: RCS/regex.c,v
retrieving revision 1.1
diff -c -r1.1 regex.c
*** 1.1	1992/08/31 09:18:53
--- regex.c	1992/08/31 09:20:38
***************
*** 2436,2441 ****
--- 2436,2442 ----
  	case notwordbound:
  	case wordbeg:
  	case wordend:
+ 	case on_failure_keep_string_jump:
            continue;
  
Tom Quinn        Theoretical Physics, University of Oxford
Internet: 	 trq@dionysos.thphys.ox.ac.uk
JANET:    	 trq@uk.ac.ox.astro
Phone:		 44-865-273956
Technical Details
Message-ID: <9208310941.AA03256@thphys.ox.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dionysos.thphys.ox.ac.uk!trq

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dionysos.thphys.ox.ac.uk!trq
From: trq@dionysos.thphys.ox.ac.uk
Subject: bug in sed 1.09
Message-ID: <9208310941.AA03256@thphys.ox.ac.uk>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 31 Aug 1992 09:41:23 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 44