lkml.org 
[lkml]   [2013]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2013-01-30 13:44    [W:0.057 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site