eirik@theory.tn.cornell.edu (Eirik Fuller) (12/20/90)
Archive-name: fixes/sun-fixes/localtime-malloc/1990-12-19 Archive: titan.rice.edu:/incoming/localtime.tar.Z [128.42.1.30] Original-posting-by: eirik@theory.tn.cornell.edu (Eirik Fuller) Original-subject: SunOS 4.1 and 4.1.1 Reposted-by: emv@ox.com (Edward Vielmetti) I was recently annoyed by the discovery that Sun still hasn't fixed their bug in localtime.o that causes GNU emacs to abort in malloc. This claim is based on cmp output; localtime.o is unchanged. It was bad enough that Sun didn't take the time to understand what caused this core dump before SunOS 4.1 was released. The 4.1 release notes suggest "#define USE_SYSTEM_MALLOC", which is a crock given that it incorrectly casts indirect blame on GNU malloc. In fact, that was a golden opportunity to debug the problem, since GNU malloc detects the memory corruption literally the next time it is called. SunOS malloc only appears to work because it is far less careful about checking for corruption of its memory. The same localtime bug causes mysterious behavior in /usr/etc/rpc.mountd, so using SunOS malloc is not in any sense a fix. Probably the best way to cure this problem is to get the file "~ftp/incoming/localtime.tar.Z" from titan.rice.edu (128.42.1.30) and install the appropriate localtime.o in /lib/libc.a (and, if you want dynamically linked binaries to work, in /lib/libc.so.*.* according to the instructions in "/usr/lib/shlib.etc/README". The Frequently Asked Questions posting for this newsgroup also has a patch to GNU malloc which humors the store beyond the allocated memory by increasing the roundup of allocation requests.