delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/16/11:30:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 16 Sep 2005 11:29:48 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bash login breaks if too many environment variables are set
Message-ID: <20050916152948.GA30538@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <67B13185D126644BA1AC929BE1F942AD7A5ADD AT dekomplm001 DOT net DOT plm DOT eds DOT com>
Mime-Version: 1.0
In-Reply-To: <67B13185D126644BA1AC929BE1F942AD7A5ADD@dekomplm001.net.plm.eds.com>
User-Agent: Mutt/1.5.8i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019