Messages in this thread | | | Date | Wed, 30 Jan 2013 12:51:53 +0100 | From | Oleg Nesterov <> | Subject | Re: [PATCH 1/1] tty: set_termios/set_termiox should not return -EINTR |
| |
On 01/30, Oleg Nesterov wrote: > > On 01/29, Jiri Slaby wrote: > > > > On 01/29/2013 08:49 PM, Oleg Nesterov wrote: > > > > > > Perhaps /bin/bash is buggy too, I do not know. Probably Roman and > > > Lingzhu can tell more. > > > > But I really want to hear more details here (the commit log deserves > > that). E.g. why it started causing problems right now. > > I have no idea, I only saw the test-case yesterday.
But if you ask how this affects /bin/bash, I can quote the description from Lingzhu,
sigchld.sh (reproducer):
#!/bin/bash ( while :; do kill -CHLD $$ 2>&- || break; done ) & while :; do read -p 1 -t 0.3 -d ' ' read -p 2 done
Double free happens in read_builtin, here
FREE (tofree); -> xfree (orig_input_string);
return (retval);
result:
sigchld.sh: line 4: read: error setting terminal attributes: Interrupted system call 1 *** glibc detected *** ./bash-4.1.2-14.el6/bin/bash: double free or corruption (out): 0x00000000020f45b0 *** ======= Backtrace: ========= (...)
Oleg.
| |