bug-gnu-utils
[Top][All Lists]
Advanced

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

sed 4.2.1 bug


From: Sophia Jacob
Subject: sed 4.2.1 bug
Date: Tue, 10 Jul 2012 15:56:38 +0530

Hi,
I stumbled upon a possible bug in sed:

$ cat c
1
2
3
4
5

$ sed -n 'H;4,${g;D;h}' c   # print the last 3 lines of a file
sed: couldn't re-allocate memory

Basically, if 'D' is used after 'g' or 'G' or 'x' (after copying from
the hold space), this realloc error is thrown. I think this is a bug.
Please let me know if this is a usage error on my part.

-------
($ sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <address@hidden>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
)
-------
(I couldn't analyze the source code because I'm not permitted to look
at any open-source product's (or any product other than my
organization's) source code. Sorry I'm not able to help.)

Thanks!
Sophia



reply via email to

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