freebsd-src/contrib/one-true-awk/bugs-fixed
Warner Losh 1023317ac4 ota: Merge one true awk 20240422 (a3b68e649d2d)
Apr 22, 2024:
	fixed regex engine gototab reallocation issue that was
	introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
	Fixed a scan bug in split in the case the separator is a single
	character. thanks to Oguz Ismail for spotting the issue.

Mar 10, 2024:
	fixed use-after-free bug in fnematch due to adjbuf invalidating
	the pointers to buf. thanks to github user caffe3 for spotting
	the issue and providing a fix, and to Miguel Pineiro Jr.
	for the alternative fix.
	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
	thanks to Miguel Pineiro Jr.

Sponsored by:		Netflix
2024-05-04 15:50:33 -06:00
..
a-format.awk
a-format.bad
a-format.ok
concat-assign-same.awk
concat-assign-same.bad
concat-assign-same.ok
decr-NF.awk
decr-NF.bad
decr-NF.ok
fmt-overflow.awk
fmt-overflow.ok
fs-overflow.awk
fs-overflow.ok
getline-corruption.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
getline-corruption.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
getline-corruption.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
getline-numeric.awk
getline-numeric.bad
getline-numeric.in
getline-numeric.ok
inf-nan-torture.awk
inf-nan-torture.in
inf-nan-torture.ok
matchop-deref.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
matchop-deref.bad Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
matchop-deref.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
matchop-deref.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
missing-precision.awk
missing-precision.err awk: Move to using two sets of tests 2021-11-05 08:53:36 -06:00
negative-nf.awk
negative-nf.err awk: Move to using two sets of tests 2021-11-05 08:53:36 -06:00
nf-self-assign.awk
nf-self-assign.bad
nf-self-assign.ok
numeric-fs.awk
numeric-fs.ok
numeric-output-seps.awk
numeric-output-seps.bad
numeric-output-seps.ok
numeric-rs.awk
numeric-rs.bad
numeric-rs.ok
numeric-subsep.awk
numeric-subsep.bad
numeric-subsep.ok
ofs-rebuild.awk
ofs-rebuild.bad
ofs-rebuild.ok
pfile-overflow.awk
pfile-overflow.err Awk: Add error file 2021-11-06 16:24:36 -06:00
README
REGRESS ota: Merge one true awk 20240422 (a3b68e649d2d) 2024-05-04 15:50:33 -06:00
rs_underflow.awk
rs_underflow.in
rs_underflow.ok
rstart-rlength.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
rstart-rlength.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
space.awk
space.bad
space.ok
split-fs-from-array.awk
split-fs-from-array.ok
string-conv.awk
string-conv.bad
string-conv.ok
subsep-overflow.awk
subsep-overflow.ok
system-status.ok2 ota: Merge one true awk 20240422 (a3b68e649d2d) 2024-05-04 15:50:33 -06:00
unary-plus.awk
unary-plus.bad
unary-plus.ok
unicode-fs-rs-1.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-fs-rs-1.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-fs-rs-1.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-fs-rs-2.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-fs-rs-2.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-fs-rs-2.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-null-match.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-null-match.bad Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00
unicode-null-match.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-02-29 10:42:06 -07:00

List of bugs fixed.

1. ofs-rebuild: OFS value used to rebuild the record was incorrect.
Fixed August 19, 2014. Revised fix August 2018.

2. system-status: Instead of a floating-point division by 256, use
the wait(2) macros to create a reasonable exit status. Fixed March 12, 2016.

3. space: Use provided xisblank() function instead of ispace() for
matching [[:blank:]].

4. a-format: Add POSIX standard %a and %A to supported formats. Check
at runtime that this format is available.

5. decr-NF: Decrementing NF did not change $0. This is a decades-old
bug. There are interactions with the old and new value of OFS as well.
Most of the fix came from the NetBSD awk.

6. string-conv: String conversions of scalars were sticky.  Once a
conversion to string happened, even with OFMT, that value was used until
a new numeric value was assigned, even if OFMT differed from CONVFMT,
and also if CONVFMT changed.

7. unary-plus: Unary plus on a string constant returned the string.
Instead, it should convert the value to numeric and give that value.

8. concat-assign-same: Concatenation previously evaluated both sides of the
expression before doing its work, which, since assign() evaluates to the cell
being assigned to, meant that expressions like "print (a = 1) (a = 2)" would
print "22" rather than "12".

9. missing-precision: When using the format string "%*s", the precision
argument was used without checking if it was present first.

10. missing-precision: When using the format string "%*s", the precision
argument was used without checking if it was present first.

11. fmt-overflow: The buffer used for OFMT/CONVFMT conversions was written
to with sprintf(), which meant that some conversions could write past the
end.

12. numeric-subsep, numeric-fs, numeric-output-seps, numerics-rs: If SUBSEP,
FS, RS, OFS, or ORS were set to a numeric value, then their string values
wouldn't always be generated before being needed.

13. subsep-overflow: The length of SUBSEP needs to be rechecked after
calling execute(), in case SUBSEP itself has been changed.

14. split-fs-from-array: If the third argument to split() comes from the
array passed as the second argument, then split() would previously read
from the freed memory and possibly produce incorrect results (depending
on the system's malloc()/free() behaviour.)

15. getline-numeric: The `getline xx < file' syntax did not check if
values were numeric, in discordance from POSIX. Test case adapted from
one posted by Ben Bacarisse <ben.usenet@bsb.me.uk> in comp.lang.awk,
January 2019.