Re: awk Segmentation faults in OpenBSD 7.4

2023-10-28 Thread Todd C . Miller
This has been now been fixed in OpenBSD and reported upstream. Thanks for including a reproducer, that made it a lot easier to fix the problem. - todd CVSROOT:/cvs Module name:src Changes by: mill...@cvs.openbsd.org 2023/10/28 16:38:22 Modified files: usr.bin/awk: ru

Re: awk Segmentation faults in OpenBSD 7.4

2023-10-28 Thread Todd C . Miller
On Sat, 28 Oct 2023 10:33:09 -0600, "Todd C. Miller" wrote: > Looks like an off-by-one introduced in the utf8 conversion. > The following fixes the bug for me. I will file a PR upstream. Unfortunately, things are not so simple. Below is a workaround until I have a better fix. - todd Index: u

Re: awk Segmentation faults in OpenBSD 7.4

2023-10-28 Thread Todd C . Miller
Looks like an off-by-one introduced in the utf8 conversion. The following fixes the bug for me. I will file a PR upstream. - todd Index: usr.bin/awk/run.c === RCS file: /cvs/src/usr.bin/awk/run.c,v retrieving revision 1.79 diff -u

Re: awk Segmentation faults in OpenBSD 7.4

2023-10-28 Thread Todd C . Miller
Thanks, the crash is fairly easy to reproduce under memory sanitizer. As a workaround, if you set LANG=C in the environment it will avoid the bug. - todd

awk Segmentation faults in OpenBSD 7.4

2023-10-28 Thread bernward . pub
>Synopsis: function substr causes random core dumps of awk >Category: user >Environment: System : OpenBSD 7.4 Details : OpenBSD 7.4 (GENERIC.MP) #0: Sun Oct 22 12:13:42 MDT 2023 r...@syspatch-74-amd64.openbsd.org:/usr/src/sys/arch/amd64/c