This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: mc segfaults


On Thu, 5 Jun 2003, Igor Pechtchanski wrote:

> Pavel,
> 
> This may be a Cygwin-specific problem.  On Cygwin, /etc/passwd doesn't
> play as key a role as it does on other Unix systems (e.g., it's not
> required for logging in on the console).  Thus, it's quite possible that
> someone will attempt to run other applications when missing /etc/passwd
> entries, and what is an abnormal situation on Unix systems might be simply
> an annoying omission in Cygwin.  I don't think the assert/crash is
> justified in this case.  At the very least it should have a more
> informative error message, and a better solution would be to simply remove
> the assert and conditionalize the following code on (pwd != NULL)
> (possibly with #ifdef __CYGWIN__ around it, although I don't think it'll
> affect the other Unix systems all that much).  I'm not all that familiar
> with mc, so the usual disclaimers apply to the above.

It was a bug indeed. The crash occured actually in a different place than 
the assertion - a NULL pointer was being passed to sprintf (). It turns 
out that most getpwuid () calls in MC are checked for != NULL and proper 
action is taken, except this one.

I'm tracking down another problem now - related to the ftpfs feature. Once 
I got it fixed I'll release an update.

Pavel


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]