Hi! > > On the contrary: I do believe that the check > > > > (environ == PL_origenviron) /* need we copy environment? */ > > > > is broken. This test would only be OK if perl itself could guarantee > > that no extension module modifies environ behind the scene. > > I do not believe this. At least the documentation I see states that > putenv() will malloc() environ if it needs to modify it. Thus with > usemymalloc=n the test is OK as is. You do know the difference between free(environ) and free(environ[i]) don't you? While the former would be safe after a call to putenv() assumed that putenv() had to expand the environment via malloc() the latter is certainly not covered by the putenv() specs. Sigh, I'll put together a perl extension module as smallest possible testcase and send it in so you folks may finally bother to reproduce the bug. FWIW, I can reproduce the problem also on linux with libc5 and libc6. Regards, Joerg -- Gaertner Datensysteme 38114 Braunschweig Joerg Schumacher Hamburger Str. 273a Tel: 0531-2335555 Fax: 0531-2335556