Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: How to Argue Technical Points (was Re: Tail patches) Message-ID: <5498@internal.Apple.COM> Date: 30 Nov 89 00:10:44 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 44 References:<5432@internal.Apple.COM> <33413@mirror.UUCP> In article <33413@mirror.UUCP> francis@mirror.UUCP (Joe Francis) writes: > I have read and understand the explanation of the dangers tail patching > poses with respect to Apple fixes to routines which check to see who > calls them. > > However, many articles ago you said that there were numerous subtle > reasons not to tail patch. None of the notes I have read refer to these > other reasons, and I would very much like to hear about ANY of them. Ok, I'll try to be thorough: 1) Many of the subtleties arise precisely because tail patches may break patches to old bugs, thereby either a) reintroducing the old bug, or b) worse, introducing some mutant version of the bug that differs in some unpredictable way from the original. Basically, many of the subtleties arise from the non-deterministic way in which a tail patch may break the system. It's not that your system will crash when it calls the patched trap, or the trap that the patch fixes, or anything so simple. Your system may not crash at all; it may just behave strangely. Or it may crash seconds or minutes or hours after calling the patched trap. Or... 2) I think the article that you're referring to was in specific response to a post with a suggested mechanism for allowing tail patches (namely to shadow the trap dispatch table), and the point that I was making was that shadowing the trap dispatch table isn't a viable alternative because: a) Some ROM routines don't call traps; they indirect through the trap dispatch table. b) Some third-party vendors' add-ons play twisted games with trap patches, in some instances even patching _GetTrapAddress so that it lies to you. Shadowing the trap dispatch table would only confuse matters in such a case even more. c) Some software tools, such as debuggers, HAVE TO, in some cases, ignore the standard trap dispatching mechanism, and it's unclear how they would behave in the presence of a shadowed trap dispatch table. I hope this clarifies somewhat what some of the potential ramifications are. __________________________________________________________________________ Just because I work for Apple Computer, Inc. doesn't mean that they believe what I believe or vice-versa. __________________________________________________________________________ C++ -- The language in which only friends can access your private members. __________________________________________________________________________