delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/08/22:11:24

Date: Tue, 05 Aug 1997 06:21:46 -0600
From: Esa Peuha <Esa DOT Peuha AT helsinki DOT fi>
Subject: Re: Emacs 22 env vars bug
Newsgroups: comp.os.msdos.djgpp
Message-ID: <870780007.32194@dejanews.com>
Organization: Deja News Posting Service
References: <Pine DOT SOL DOT 3 DOT 96 DOT 970715124917 DOT 6183A-100000 AT kruuna DOT Helsinki DOT FI> <33d7e79d DOT 10682519 AT news-win DOT inp DOT nsk DOT su>
Lines: 25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <33d7e79d DOT 10682519 AT news-win DOT inp DOT nsk DOT su>,
  bukinm AT inp DOT nsk DOT su wrote:
> There is a bug in putenv (when allocating bigger chunk for
> environ, one element is not counted).
> This bug can explain magic number 21.

[patch snipped]

> The line with `putenv_bss_count = __bss_count;' was commented,
> because later there is a test for `putenv_bss_count != __bss_count'.
> (This can be left as it was, but it should be changed somehow).

Are you sure that this change won't cause another latent bug?

> Emacs compiled with patched putenv does not crash,
> but emacs compiled without it does.

The call to malloc your patch corrects is very likely the cause of this
bug. Apparently it doesn't hurt djgpp's normal malloc routine, but Emacs'
malloc seems to be more sensitive. If this is true, distributed emacs.exe
should crash with 6, 22, 54, 118,... environment variables (ie power of 2
minus 10). I'll test this ASAP.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

- Raw text -


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