Opened 23 years ago
Closed 19 years ago
#303 closed defect (fixed)
gawk-3.1.5
Reported by: | Owned by: | Matthew Burgess | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Book | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: | iwanek@… |
Description
Attachments (2)
Change History (37)
comment:1 by , 23 years ago
dependson: | → 30 |
---|
comment:2 by , 23 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 23 years ago
comment:5 by , 23 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | gawk-3.1.0 → gawk-3.1.1 |
comment:7 by , 23 years ago
Owner: | changed from | to
---|---|
Status: | reopened → assigned |
comment:8 by , 23 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 by , 22 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | gawk-3.1.1 → gawk-3.1.2 |
Version increment (3.1.2)
comment:10 by , 22 years ago
Priority: | normal → highest |
---|
comment:11 by , 22 years ago
Status: | reopened → assigned |
---|
comment:12 by , 22 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:13 by , 21 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | gawk-3.1.2 → gawk-3.1.3 |
Version increment (3.1.3)
comment:14 by , 21 years ago
Also note that a problem was reported about gawk not handling zero sized files (e.g. those in the /proc filesystem) correctly and a patch posted on the lfs- dev list IIRC. This is no longer required as of version 3.1.3 (according to the ChangeLog entry under March 27 2003 at least).
Matt.
comment:15 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:16 by , 21 years ago
dependson: | 30 |
---|
comment:17 by , 21 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The patch is (probably) not needed anymore. See <http://archives.linuxfromscratch.org/mail-archives/lfs-dev/2003-November/040662.html>.
comment:18 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Discussion on lfs-dev reached conclusion to drop the current Gawk Libexecdir patch. Comiitted the changes. Closing.
comment:19 by , 20 years ago
Priority: | highest → normal |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Summary: | gawk-3.1.3 → gawk-3.1.4 |
Version: | CVS → TESTING |
Version increment (3.1.4)
comment:21 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:22 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | gawk-3.1.4 → gawk-3.1.5 |
Version: | TESTING → SVN |
Version increment (3.1.5). Lots of multi-byte related fixes, along with a whole slew of other changes. NEWS has the gory details.
comment:23 by , 19 years ago
This appears to be the cause of a failure in gettext's testsuite:
SKIP: lang-java SKIP: lang-csharp 2c2 < 2 morceaux de gateau ---
2 pieces of cake
FAIL: lang-gawk
Can anyone confirm?
comment:25 by , 19 years ago
Thanks. FYI, I've reported this upstream via bug-gnu-utils. I'll keep this bug posted as to any responses I receive.
comment:26 by , 19 years ago
The quick fix (for gawk) is:
./configure --prefix=/usr --libexecdir=/usr/lib
cat >>config.h <<"EOF" #define HAVE_ISBLANK 1 #define HAVE_LANGINFO_CODESET 1 #define HAVE_LANGINFO_H 1 #define HAVE_LC_MESSAGES 1 EOF
make
make install
Upstream will update autofoo magic instead, but that's not a fix acceptable for LFS, since gawk is built before autofoo.
comment:27 by , 19 years ago
One more gawk-3.1.5 regression has been reported to upstream by Karl Berry. Copy-and-paste from the list archive:
$ mkdir empty $ cd empty $ ls $ gawk 'END{}' \* * glibc detected * free(): invalid pointer: 0x080a15e0 * Aborted
Reproducible on LFS with gawk-3.1.5 as well. Not reproducible on UTF-8 Live CD which uses gawk-3.1.4 with a ton of patches.
comment:28 by , 19 years ago
The second bug is fixed with (copy-and-paste from http://lists.gnu.org/archive/html/bug-gnu-utils/2005-08/msg00047.html):
--- ../gawk-3.1.5/io.c 2005-07-26 21:07:43.000000000 +0300 +++ io.c 2005-08-12 13:10:28.239852344 +0300 @@ -2480,9 +2480,12 @@
{
struct stat sbuf; struct open_hook *oh;
+ int iop_malloced = FALSE;
- if (iop == NULL)
+ if (iop == NULL) {
emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
+ iop_malloced = TRUE; + }
memset(iop, '\0', sizeof(IOBUF)); iop->flag = 0; iop->fd = fd;
@@ -2495,7 +2498,8 @@
}
if (iop->fd == INVALID_HANDLE) {
- free(iop);
+ if (iop_malloced) + free(iop);
return NULL;
} if (isatty(iop->fd))
@@ -2503,7 +2507,7 @@
iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf); iop->sbuf = sbuf; if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0)
- lintwarn(_("data file `%s' is empty"), name);
+ lintwarn(_("data file `%s' is empty"), name);
errno = 0; iop->count = iop->scanoff = 0; emalloc(iop->buf, char *, iop->size += 2, "iop_alloc");
comment:29 by , 19 years ago
(In reply to comment #17)
The quick fix (for gawk) is:
./configure --prefix=/usr --libexecdir=/usr/lib
cat >>config.h <<"EOF" #define HAVE_ISBLANK 1 #define HAVE_LANGINFO_CODESET 1 #define HAVE_LANGINFO_H 1 #define HAVE_LC_MESSAGES 1 EOF
Alexander, it doesn't necessarily follow that missing HAVE_* variables are automatic bugs IMHO. If you grepped the Gawk source code for those vars you'd see that some of those vars make no difference at all. In this case, only the HAVE_LC_MESSAGES var is needed to make the Gettext testsuite pass.
comment:30 by , 19 years ago
I have to disagree here. HAVE_LANGINFO_CODESET is needed, because it selects a different code path in regcomp.c (falling back to manually parsing LC_* variables instead of using nl_langinfo(CODESET)). The difference leads to misdetection of character set in locales like fr_FR@euro. I will try to produce a testcase if you really want that.
As for the rest, additional reading is required in order to decide whether these macros are needed.
comment:31 by , 19 years ago
Sorry for the last comment. While the code path without HAVE_LANGINFO_CODESET is suboptimal (and different from the intended one), it doesn't look like it can lead to a wrong result.
comment:32 by , 19 years ago
Well, I was able to construct a semi-complete testcase for HAVE_LANGINFO_CODESET. To prove that it is needed, add some debugging output to regcomp.c:
sed -i.bak 's@dfa->is_utf8 = 1;@{dfa->is_utf8 = 1; fprintf(stderr, "UTF-8 locale
detected
n");}@' regcomp.c
Then configure and make as usual:
./configure --prefix=/usr --libexecdir=/usr/lib
cat >>config.h <<"EOF" #define HAVE_LC_MESSAGES 1 EOF
make
Now the test:
LC_ALL=vi_VN ./gawk '' /dev/null
(vi_VN is a UTF-8 based locale with the name not ending in UTF-8). Without HAVE_LANGINFO_CODESET, gawk doesn't print the debugging message. With HAVE_LANGINFO_CODESET, the message is printed. What's left for a clean testcase is to find one more UTF-8 bug in dfa.c and try exploiting it in this locale.
Of course this comment is irrelevant if UTF-8 is not supported.
comment:33 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:34 by , 19 years ago
Status: | new → assigned |
---|
comment:35 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
* Bug 211 has been marked as a duplicate of this bug. *