piet@cwi.nl (Piet Beertema) (09/01/90)
Whereas on several systems (SUNs, Encore, HCX) it was quite straightforward to get sendmail-5.64 (plus IDA-1.3.1) to run, I had serious problems getting it to work on an Alliant FX/4: it dumped core when the frozen config file was used; without the frozen config it worked okay. sendmail-5.61/IDA had given no problems on any of these systems. The problem could be tracked down to a small difference between 5.61 and 5.64, but a very dangerous one: main() calls setdefaults() prior to thawing the frozen config or reading the config file (and freezing it). New in 5.64 is that setdefaults() calls setdefuser(), which via the newstr() macro calls malloc(). When using the frozen config, this happens *before* the frozen config is read; after reading the frozen config, the malloc structure *may* then be messed up, depending on the malloc() implementation. That was apparently the case on the Alliant. Since setdefuser() needs to be called only just prior to reading (and perhaps freezing) the config file, the fix is simple: - delete the setdefuser() call from setdefaults() in conf.c - add a setdefuser() call at the start of readcf() in readcf.c -- Piet Beertema, CWI, Amsterdam (piet@cwi.nl)
piet@cwi.nl (Piet Beertema) (09/07/90)
>When using the frozen config, this happens *before* the frozen >config is read; after reading the frozen config, the malloc >structure *may* then be messed up, depending on the malloc() >implementation. That was apparently the case on the Alliant. > >Since setdefuser() needs to be called only just prior to reading >(and perhaps freezing) the config file, the fix is simple: >- delete the setdefuser() call from setdefaults() in conf.c >- add a setdefuser() call at the start of readcf() in readcf.c I've had reports from several sites where this fix didn't have the expected result: sendmail kept dumping core when using the frozen config file. I've now been able to reproduce that on a SUN here. The difference with all other SUNs here is that this one doesn't use yellow pages, which makes a difference for getpwuid() used in the setdefuser() routine. I haven't tracked down yet where the problem now really stems from, but a hack that has made it work on all systems here is to just delete the setdefuser() call completely (from setdefaults() where it was originally and the first one in readcf() as per the fix I gave). -- Piet Beertema, CWI, Amsterdam (piet@cwi.nl)