Closed dkogan closed 6 years ago
That's the Debian package which crashes. I tried this with mawk 1.3.4 20161120, and it gave this for output (no crash):
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
You might want to add this report to the list for Debian's antique.
Aha. Thanks for that. Before filing the bug I did try to check the bleeding-edge version to see if it crashes. But I couldn't figure out which is the bleeding edge. You have multiple "mawk" repos in github for instance. Is "original-mawk" the bleeding edge?
----- Original Message ----- | From: "Dima Kogan" notifications@github.com | To: "ThomasDickey/original-mawk" original-mawk@noreply.github.com | Cc: "ThomasDickey" dickey@his.com, "State change" state_change@noreply.github.com | Sent: Sunday, October 15, 2017 7:57:58 PM | Subject: Re: [ThomasDickey/original-mawk] mawk crashes if the stack size is exceeded (#48) |
---|---|---|---|---|---|
Aha. Thanks for that. Before filing the bug I did try to check the | |||||
bleeding-edge version to see if it crashes. But I couldn't figure | |||||
out which is the bleeding edge. You have multiple "mawk" repos in | |||||
github for instance. Is "original-mawk" the bleeding edge? |
"original-mawk" is just the bug reports. "mawk-snapshots" is what you're looking for. The other (dated ones) were full exports while attempting to appease Debian's ostensible maintainer, and aren't current.
-- Thomas E. Dickey dickey@invisible-island.net http://invisible-island.net ftp://invisible-island.net
OK. I didn't realize that Debian is shipping a very old mawk. I might join that discussion too, but that's orthogonal to this one.
I just tried the latest snapshot in "mawk-snapshots": t20161120. It shows the issue described here, you just need a larger numbe of '1's. On my Debian box it works with <= 1333 '1's but crashes with >= 1334 '1's. Let me know if you can't reproduce, and I'll dig a bit deeper.
And I think it's important to mention that this isn't a made-up corner case. I maintain a little application (not free software yet, but soon) that uses mawk internally, and this crash was reported to me as a crash of my tool.
I took a look, can see why it does that (and am considering how to solve it).
The actual program logic for checking the stack overflow was only in debug-code (and incomplete since it did not account for the separate stack for user-functions). The simple fix is just making those checks work. As an alternative, they could be reallocated rather than exiting with an error message (but I'm not convinced that's necessary).
fixed in 1.3.4.20171017
no problem
Hi. Currently if a function is called with too many arguments, mawk crashes. It'd be nice if it at least produced an error message instead of silently dying.
To reproduce:
On my box (using the latest mawk from Debian) I get a segfault.
The relevant value being exceeded is EVAL_STACK_SIZE.
Thanks