From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,8acd4291c317f897 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,8acd4291c317f897 X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Safety of the Booch Ada 95 Components Date: 1999/12/13 Message-ID: <385584E0.D72D847D@mitre.org>#1/1 X-Deja-AN: 560302913 Content-Transfer-Encoding: 7bit References: <1e2lds4.7trgj21rgj9i0N%herwin@gmu.edu> <3851c7b9_4@news1.prserv.net> <1e2ns7h.cx85ir1azwo9iN%herwin@gmu.edu> <82up01$ddg$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 945128261 24534 129.83.41.77 (13 Dec 1999 23:37:41 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 13 Dec 1999 23:37:41 GMT Newsgroups: comp.lang.ada,comp.lang.c++ Date: 1999-12-13T23:37:41+00:00 List-Id: Kent Paul Dolan wrote: > This one sets alarm bells ringing like crazy. I was a user of > AmigaBASIC, whose developers assumed that the 24 bits in use of 32 bit > pointers they saw when the machine in an early OS rev would be the law > forever, ignored the developer manuals warnings to the contrary, used > the other 8 bits for string lengths or some such, in a petty search for > "efficiency" at the expense of clean coding, and had their software die > a horrible death when the OS was upgraded within a couple of years to > use all 32 bits of a pointer. 1) The Amiga coding standards from day one emphasized "32-bit" clean, since there were already plans for a 68020 based machine. (In fact, the first 68020 demo I saw, under non-disclosure, was running AmigaDOS 1.1.) 2) Actually the problem was that it stored pointers in 3 bytes, not 4, I think I still have the patch to fix it floating around. (It was an extremely small patch.) 3) The developer of AmigaBASIC was Microsoft, and they refused to make the fix even when asked by Commodore. 4) That was why AmigaBASIC was dropped in the next version of AmigaDOS. > Some "efficiencies" aren't worth the risk, and the damage to pointer > semantics of using some bits for "non-pointer purposes" would be nearly > incalculable. I think that Robert Dewar was referring to the low-order two bits, which were, of course, unavailable in Microsoft's AmigaBASIC. > Oh, and did you lock your structures against traversal by other threads > while the (possibly time consuming) deep copy was ongoing, or are the > munged pointers going to be visible outside the deep copy process? You had better do lcoking in any case. But since the flipped bits can be in your new data structure only, you don't have to worry about some other assignment geting at them. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...