Closed hannob closed 7 years ago
I don't see this (using Debian testing with either clang 3.6.2 or gcc 6.1.1). I'm testing using the default configuration (which corresponds to your stack trace), using mawk's built-in regex.
It just says:
> ./mawk -f foo.awk
mawk: foo.awk: line 1: runaway regular expression /[[:]/ ...
I still see this with the latest snapshot. Have you tested with address sanitizer? These kinds of buffer overreads usually don't crash applications. Test with something like:
./configure CFLAGS="-fsanitize=address -g" CXXFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=address"
make
./mawk -f [file]
I did that, but overlooked the zip-file difference from cut/paste.
This script will cause an out of bounds heap read in mawk:
Also attached. This was found with american fuzzy lop and address sanitizer. To see this bug you have to compile mawk with address sanitizer enabled (-fsanitize=address in CFLAGS). mawk-oob-heap-read-do_class.zip
Full address sanitizer error: