Hi! > > The test > > > > if (environ == PL_origenviron) > > > > in util.c:my_setenv() assumes that the char **environ will only be > > modified by perl itself. > > How does it assume it? Do you try to imply that environ may be > changed before a call to perl_parse()? No, the scenario is as follows: 1) perl_parse() saves the pointer to the environment in PL_origenviron 2) some extension interface (here Term::ReadLine::Gnu) is called and does modify the pointer to the environment via putenv(3) 3) the perlscript tries to assign a new value to an environment variable and perl therefore calls my_setenv() 4) my_setenv() does check if it needs to copy the environment but the check returns false since (environ != PL_origenviron) 5) my_setenv() calls Safefree() and free()s some unallocated memory Kind Regards, Joerg -- Gaertner Datensysteme 38114 Braunschweig Joerg Schumacher Hamburger Str. 273a Tel: 0531-2335555 Fax: 0531-2335556