-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of >/dev/null 2>&1 in called function causes "Abort(coredump)" #1485
Comments
Hi @xmnboy
Thanks very much. I will take a look at this. |
Hi @xmnboy (Paul),
Just to let you know, I have reproduced your bug exactly in my own development environment, including that "invalid pointer" message. I think that I fixed a bug in the "redirection" code already, but this new bug could be anywhere. I have not done a deep dive into it yet. But due to my schedule, it may be quite some time before I can get to this. |
Hi @xmnboy (Paul), Please send me your email address (to 'morano@ieee.org') if you would like a work-around (and other information) for this bug. |
Hi @DavidMorano, No need for a workaround. I came up with an alternative approach to what I was trying to do that side-steps the bug. Thanks for taking the time to confirm that the bug is real. 😄 I don't recall precisely what I did to side-step it (this has been a very busy few months), I'd have to go back and look at the script's git history; if you want the workaround, when I get some time, I can go back and figure out what I did to side-step it. I'm only too aware of the large number of ksh variants floating around out there. The script(s) in which I discovered this bug are, unfortunately, sourced scripts and need to run on a large number of customer platforms; thus I have no control over the sourcing shell, other than it must be a POSIX compatible shell. I ran into ksh2020 on an Ubuntu 20.04 platform we were testing against. I've also been testing against ksh93+ and lksh/mksh (both variants seem to be pretty prevalent). No rush to get a fix on my account. Good luck with your ksh2020 project and thanks again for validating the bug. --Paul |
Description of problem:
Use of
>/dev/null 2>&1
within a called function causes function to terminate with anAbort(coredump)
message.ksh version:
Version A 2020.0.0
Linux distribution:
How reproducible:
Discovered in a sourced script, but also reproducible within an executed script. No such problem with
ksh93
version ofksh
or with[lm]ksh
fork. Not sure about earlier versions ofksh2020
.Steps to reproduce:
Source or execute this script from a
ksh2020
prompt (testing was done as root user on an Ubuntu 20.04 system):Actual results:
Expected results:
Additional info:
While initially debugging this issue I managed to also generate a
free(): invalid pointer
message along with theAbort(coredump)
message. But I am not able to recall precisely what I did that resulted in that additional error message. Including it here because it may be of value regarding resolution of this problem.The text was updated successfully, but these errors were encountered: