gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (09/20/85)
While porting the 5620 DMD software to a different architecture (Gould PN6000), I discovered that whoever wrote some of the "ld" source code took advantage of knowledge of how malloc() operates in order to perform extra validity checking in the myfree() routine. Unfortunately, he did not do this correctly. The "nextblk" pointer is stored in a (union store) before the malloc return value, not in a (char **). These need not be the same size, and on the Gould they weren't. Either the necessary code from malloc() should be borrowed, or (much better) the extra validity checking should be removed or done in some system-independent way. The source file I found this in was $DMDSGS/sgs/mac/common/ofc/ld/util.c Presumably the analogous file in the "ld" sources in other AT&T SGS packages has the same problem.