opnsense-src/contrib/one-true-awk/bugs-fixed
Warner Losh 646e1679a3 ota: Merge 20240623 (bsd-features) from ota 9f971fba471b
Merge from upstream. The system-status test was modifed upstream, but it
still doesn't fit into ATF, so those changes weren't brought in.

From FIXES:

Jun 23, 2024
	Fix signal for system-status test. Thanks to Tim van der Molen.
	Rewrite if-else chain as switch. Thanks to Andrew Sukach.

May 27, 2024
	Spelling fixes and removal of unneeded prototypes and extern.
	Thanks to Jonathan Gray.

May 4, 2024
	Fixed a use-after-free bug with ARGV for "delete ARGV".
	Also ENVtab is no longer global. Thanks to Benjamin Sturz
	for spotting the ARGV issue and	Todd Miller for the fix.

May 3, 2024:
	Remove warnings when compiling with g++. Thanks to Arnold Robbins.

Sponsored by:		Netflix

(cherry picked from commit 17853db4b0)
2024-12-01 10:33:16 -07: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 awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
getline-corruption.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
getline-corruption.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
getline-corruption.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
getline-numeric.awk
getline-numeric.bad
getline-numeric.in
getline-numeric.ok
inf-nan-torture.awk awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
inf-nan-torture.in awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
inf-nan-torture.ok awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
matchop-deref.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
matchop-deref.bad Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
matchop-deref.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
matchop-deref.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06: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 ota: Merge 20240623 (bsd-features) from ota 9f971fba471b 2024-12-01 10:33:16 -07:00
ofs-rebuild.bad
ofs-rebuild.ok
pfile-overflow.awk awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
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-20 13:29:19 -06:00
rs_underflow.awk awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
rs_underflow.in awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
rs_underflow.ok awk: Merge 20210729 from One True Awk upstream (0592de4a) 2021-08-01 10:22:39 -06:00
rstart-rlength.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
rstart-rlength.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06: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 20240623 (bsd-features) from ota 9f971fba471b 2024-12-01 10:33:16 -07: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-03-11 22:53:18 -06:00
unicode-fs-rs-1.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-fs-rs-1.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-fs-rs-2.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-fs-rs-2.in Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-fs-rs-2.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-null-match.awk Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-null-match.bad Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06:00
unicode-null-match.ok Merge one true awk from 2024-01-22 for the Awk Second Edition support 2024-03-11 22:53:18 -06: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.