Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

0.6.7: Segfault in ptsname/ttyname_r

 
Post new topic   Reply to topic    Syllable Forum Index -> Bugs - Fixed
View previous topic :: View next topic  
Author Message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Wed Oct 28, 2009 7:15 am    Post subject: 0.6.7: Segfault in ptsname/ttyname_r Reply with quote

I've added a tool (systools/unbuffer.c) which is designed to stop the stderr/stdout output being poorly interleaved during builds. It does this by creating it's own PTY and then fork()ing and executing the command with it connected to the slave PTY: this stops Glibc block-buffering stdout when it redirected to a file.

This works fine on trivial test cases I.e. "unbuffer ls" will work fine. However in a more complex case i.e. from the start.sh script:

unbuffer cvs -z9 -q update -r $CVS_TAG -dP &>$LOG

will crash with the stack trace indicating that a double-free some place during ptsname/ttyname_r/getttyname_r

Just to be sure I've tested the same code & test case on Linux where it works as expected.
Back to top
View user's profile Send private message Send e-mail
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Thu Oct 29, 2009 11:05 am    Post subject: Reply with quote

Ignore that, I'm an idiot and was smashing the stack in some other fashion. Fixed in unbuffer.c in CVS.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Bugs - Fixed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group