version 1.24, 2020/06/10 21:02:19 |
version 1.25, 2020/06/10 21:02:33 |
|
|
This file lists all bug fixes, changes, etc., made since the AWK book |
This file lists all bug fixes, changes, etc., made since the AWK book |
was sent to the printers in August, 1987. |
was sent to the printers in August, 1987. |
|
|
|
September 10, 2019: |
|
Fixes for various array / memory overruns found via gcc's |
|
-fsanitize=unknown. Thanks to Alexander Richardson (Github |
|
user arichardson). Merges PRs 47 and 48. |
|
|
|
July 28, 2019: |
|
Import grammar optimization from NetBSD: Two string constants |
|
concatenated together get turned into a single string. |
|
|
|
July 26, 2019: |
|
Support POSIX-specified C-style escape sequences "\a" (alarm) |
|
and "\v" (vertical tab) in command line arguments and regular |
|
expressions, further to the support for them in strings added on |
|
Apr 9, 1989. These now no longer match as literal "a" and "v" |
|
characters (as they don't on other awk implementations). |
|
Thanks to Martijn Dekker. |
|
|
|
July 17, 2019: |
|
Pull in a number of code cleanups and minor fixes from |
|
Warner Losh's bsd-ota branch. The only user visible change |
|
is the use of random(3) as the random number generator. |
|
Thanks to Warner Losh for collecting all these fixes in |
|
one easy place to get them from. |
|
|
|
July 16, 2019: |
|
Fix field splitting to use FS value as of the time a record |
|
was read or assigned to. Thanks to GitHub user Cody Mello (melloc) |
|
for the fix. (Merged from his branch, via PR #42.) Updated |
|
testdir/T.split per said PR as well. |
|
|
|
June 24, 2019: |
|
Extract awktest.tar into testdir directory. Add some very |
|
simple mechanics to the makefile for running the tests and |
|
for cleaning up. No changes to awk itself. |
|
|
June 17, 2019: |
June 17, 2019: |
Disallow deleting SYMTAB and its elements, which creates |
Disallow deleting SYMTAB and its elements, which creates |
use-after-free bugs. Thanks to GitHub user Cody Mello (melloc) |
use-after-free bugs. Thanks to GitHub user Cody Mello (melloc) |
|
|
/pat/, \n /pat/ {...} is now legal, though bad style to use. |
/pat/, \n /pat/ {...} is now legal, though bad style to use. |
|
|
added checks to new -v code that permits -vnospace; thanks to |
added checks to new -v code that permits -vnospace; thanks to |
ruslan ermilov for spotting this and providing the patch. |
ruslan ermilov for spotting this and providing the patch. |
|
|
removed fixed limit on number of open files; thanks to aleksey |
removed fixed limit on number of open files; thanks to aleksey |
cheusov and christos zoulos. |
cheusov and christos zoulos. |
|
|
fixed day 1 bug that resurrected deleted elements of ARGV when |
fixed day 1 bug that resurrected deleted elements of ARGV when |
used as filenames (in lib.c). |
used as filenames (in lib.c). |
|
|
and arnold robbins, changed srand() to return the previous |
and arnold robbins, changed srand() to return the previous |
seed (which is 1 on the first call of srand). the seed is |
seed (which is 1 on the first call of srand). the seed is |
an Awkfloat internally though converted to unsigned int to |
an Awkfloat internally though converted to unsigned int to |
pass to the library srand(). thanks, everyone. |
pass to the library srand(). thanks, everyone. |
|
|
fixed a subtle (and i hope low-probability) overflow error |
fixed a subtle (and i hope low-probability) overflow error |
in fldbld, by adding space for one extra \0. thanks to |
in fldbld, by adding space for one extra \0. thanks to |
robert bassett for spotting this one and providing a fix. |
robert bassett for spotting this one and providing a fix. |
|
|
removed the files related to compilation on windows. i no |
removed the files related to compilation on windows. i no |
|
|
|
|
Oct 23, 2007: |
Oct 23, 2007: |
minor fix in lib.c: increase inputFS to 100, change malloc |
minor fix in lib.c: increase inputFS to 100, change malloc |
for fields to n+1. |
for fields to n+1. |
|
|
fixed memory fault caused by out of order test in setsval. |
fixed memory fault caused by out of order test in setsval. |
|
|
|
|
|
|
core dump on linux with BEGIN {nextfile}, now fixed. |
core dump on linux with BEGIN {nextfile}, now fixed. |
|
|
removed some #ifdef's in run.c and lex.c that appear to no |
removed some #ifdef's in run.c and lex.c that appear to no |
longer be necessary. |
longer be necessary. |
|
|
Apr 24, 2005: |
Apr 24, 2005: |
|
|
rethinking it. |
rethinking it. |
|
|
Dec 31, 2004: |
Dec 31, 2004: |
prevent overflow of -f array in main, head off potential error in |
prevent overflow of -f array in main, head off potential error in |
call of SYNTAX(), test malloc return in lib.c, all with thanks to |
call of SYNTAX(), test malloc return in lib.c, all with thanks to |
todd miller. |
todd miller. |
|
|
Dec 22, 2004: |
Dec 22, 2004: |
|
|
code known to man. |
code known to man. |
|
|
fixed a storage leak in call() that appears to have been there since |
fixed a storage leak in call() that appears to have been there since |
1983 or so -- a function without an explicit return that assigns a |
1983 or so -- a function without an explicit return that assigns a |
string to a parameter leaked a Cell. thanks to moinak ghosh for |
string to a parameter leaked a Cell. thanks to moinak ghosh for |
spotting this very subtle one. |
spotting this very subtle one. |
|
|
Jul 31, 2003: |
Jul 31, 2003: |
|
|
radix character in programs and command line arguments regardless of |
radix character in programs and command line arguments regardless of |
the locale; otherwise, the locale should prevail for input and output |
the locale; otherwise, the locale should prevail for input and output |
of numbers. so it's intended to work that way. |
of numbers. so it's intended to work that way. |
|
|
i have rescinded the attempt to use strcoll in expanding shorthands in |
i have rescinded the attempt to use strcoll in expanding shorthands in |
regular expressions (cclenter). its properties are much too |
regular expressions (cclenter). its properties are much too |
surprising; for example [a-c] matches aAbBc in locale en_US but abBcC |
surprising; for example [a-c] matches aAbBc in locale en_US but abBcC |
|
|
Jun 28, 2002: |
Jun 28, 2002: |
modified run/format() and tran/getsval() to do a slightly better |
modified run/format() and tran/getsval() to do a slightly better |
job on using OFMT for output from print and CONVFMT for other |
job on using OFMT for output from print and CONVFMT for other |
number->string conversions, as promised by posix and done by |
number->string conversions, as promised by posix and done by |
gawk and mawk. there are still places where it doesn't work |
gawk and mawk. there are still places where it doesn't work |
right if CONVFMT is changed; by then the STR attribute of the |
right if CONVFMT is changed; by then the STR attribute of the |
variable has been irrevocably set. thanks to arnold robbins for |
variable has been irrevocably set. thanks to arnold robbins for |
|
|
Jan 1, 2002: |
Jan 1, 2002: |
fflush() or fflush("") flushes all files and pipes. |
fflush() or fflush("") flushes all files and pipes. |
|
|
length(arrayname) returns number of elements; thanks to |
length(arrayname) returns number of elements; thanks to |
arnold robbins for suggestion. |
arnold robbins for suggestion. |
|
|
added a makefile.win to make it easier to build on windows. |
added a makefile.win to make it easier to build on windows. |
|
|
|
|
May 25, 2000: |
May 25, 2000: |
yet another attempt at making 8-bit input work, with another |
yet another attempt at making 8-bit input work, with another |
band-aid in b.c (member()), and some (uschar) casts to head |
band-aid in b.c (member()), and some (uschar) casts to head |
off potential errors in subscripts (like isdigit). also |
off potential errors in subscripts (like isdigit). also |
changed HAT to NCHARS-2. thanks again to santiago vila. |
changed HAT to NCHARS-2. thanks again to santiago vila. |
|
|
|
|
the test case.) |
the test case.) |
|
|
Apr 16, 1999: |
Apr 16, 1999: |
with code kindly provided by Bruce Lilly, awk now parses |
with code kindly provided by Bruce Lilly, awk now parses |
/=/ and similar constructs more sensibly in more places. |
/=/ and similar constructs more sensibly in more places. |
Bruce also provided some helpful test cases. |
Bruce also provided some helpful test cases. |
|
|
|
|
|
|
Oct 19, 1998: |
Oct 19, 1998: |
fixed a couple of bugs in getrec: could fail to update $0 |
fixed a couple of bugs in getrec: could fail to update $0 |
after a getline var; because inputFS wasn't initialized, |
after a getline var; because inputFS wasn't initialized, |
could split $0 on every character, a misleading diversion. |
could split $0 on every character, a misleading diversion. |
|
|
fixed caching bug in makedfa: LRU was actually removing |
fixed caching bug in makedfa: LRU was actually removing |
|
|
input file. (thanks to arnold robbins for inspiration and code). |
input file. (thanks to arnold robbins for inspiration and code). |
|
|
small fixes to regexpr code: can now handle []], [[], and |
small fixes to regexpr code: can now handle []], [[], and |
variants; [] is now a syntax error, rather than matching |
variants; [] is now a syntax error, rather than matching |
everything; [z-a] is now empty, not z. far from complete |
everything; [z-a] is now empty, not z. far from complete |
or correct, however. (thanks to jeffrey friedl for pointing out |
or correct, however. (thanks to jeffrey friedl for pointing out |
some awful behaviors.) |
some awful behaviors.) |