Article View: net.bugs.usg
Article #222SGS "ld" portability bug
From: Doug Gwyn <gwyn>
Date: Fri, 20 Sep 1985 20:33
Date: Fri, 20 Sep 1985 20:33
17 lines
1390 bytes
1390 bytes
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.
Technical Details
Message-ID:
<1631@brl-tgr.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwynShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) Newsgroups: net.bugs.usg Subject: SGS "ld" portability bug Message-ID: <1631@brl-tgr.ARPA> Date: Fri, 20-Sep-85 16:33:41 EDT Article-I.D.: brl-tgr.1631 Posted: Fri Sep 20 16:33:41 1985 Date-Received: Sun, 22-Sep-85 05:57:58 EDT Distribution: net Organization: Ballistic Research Lab Lines: 17