X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <10201180538.AA24590@clio.rice.edu> Subject: Re: env.exe crash - reproducible test program To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Thu, 17 Jan 2002 23:38:24 -0600 (CST) Cc: acottrel AT ihug DOT com DOT au (Andrew Cottrell), djgpp-workers AT delorie DOT com (DJGPP developers) In-Reply-To: from "Eli Zaretskii" at Jan 16, 2002 08:24:20 AM X-Mailer: ELM [version 2.5 PL2] Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk The following program will crash when built with v2.04/cvs due to a free nonallocate block assert failure. Fails on Win2K and Win95. You must not have the DJGPP environment variable set to have it fail (if set, it runs). Evil. Compiled with gcc -g env2.c -o env2.exe #include extern char **environ; int main (int argc, char **argv, char **envp) { char *dummy_environ[1]; malloc_debug(3); environ = dummy_environ; environ[0] = NULL; for (; *envp; envp++) putenv (*envp); while (*environ) puts (*environ++); return 0; }