This is the mail archive of the cygwin 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: Bash login breaks if too many environment variables are set


On Fri, Sep 16, 2005 at 03:55:14PM +0200, Hommersom, Fred wrote:
>Yes sure. You can see this in the header of the dump its says:
>DLL version:  1005.19, api: 0.138
>DLL build:    20050916 00:00:39SNP
>
>In order to be sure that we are talking about the same things:
>I have all these variables in DOS and start bash from a CMD window with command
>c:\cygwin\bin\strace -o fhbashtrace.txt c:\cygwin\bin\bash 
>
>As indicated in previous mails the stackdump occurs only with an exact number of characters
>for all environment names and values together. My names and values have sizes of 1-1000 characters. No extremes.
>But this dll behaves differently from the "production".
>Now if I have one character less then the 'dumping' number some commands (e.g. ls) works, others don't.
>I did not find a pattern in it. I'll keep trying.
>
>But if I add 10 characters to an enviroment variable ( so 10 more then the number that gives the dump)
>then bash exits immediately without dump. Strace gives:
>   27     324 [main] bash 3024 set_myself: myself->dwProcessId 3024
>   23     347 [main] bash 3024 time: 1126876171 = time (0)
>  422     769 [main] bash 3024 environ_init: 0x10010238: !C:=C:\Dat
>No more output here, no stackdump nothing. just exit
>
>
>It looks to me as if a buffer or stack is reused if some maximum is
>exceeded with effect that the system sometimes works.

 From your strace output, it looks to me like windows itself is returning
garbage when we ask it for the list of environment variables.

If that is the case, we can guard against that but we can't make the
passed in environment useful, unfortunately.

cgf

--
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]