Amiga.org
Amiga computer related discussion => General chat about Amiga topics => Topic started by: pkivolowitz on March 16, 2010, 04:22:28 AM
-
Last story for a bit. Not at all ASDG related :)
The Amiga OS, especially towards the end of Commodore, was probably the most bug-free non-trivial OS ever - or for at least a very long time. Even without an MMU to keep tasks penned in their own virtual address space, Amigas could remain up and running for months on end.
Any error in any program or in the OS could instantly bring down the entire machine. Yet, the machine was incredibly reliable (with a large body of 3rd party software running too).
What made this possible way back when? Many things, not the least of which was a shared ethic held by Commodore on down through the developer community of taking bugs and bug hunting seriously. Many later platforms dismissed fixing old features in favor of adding new features because new features are what sold systems. The Amiga was proof that a developer and OS provider could innovate like mad and STILL be committed to quality.
One of the tools we used depended on an infinite number of deceased cows. The tool was called Enforcer, written by Bryce Nesbitt.
The tool was very effective at finding two extremely common bug types. Array overruns and dangling pointers. This is where the cows come in.
The 68K could not use an odd number as an address of data or instruction. Encountering an odd numbered address was an instant Guru Meditation.
Unallocated memory was filled with the value 0xDEADBEEF (notice the last F - it is 15 - odd). If you had a bogus pointer and it landed in unallocated space you would instantly crash. A good reliable crash is a debugger's best friend. Pointers could be bogus because they contain garbage or they refer to memory which used to be allocated but was freed (and you're still wrongly hanging on to the pointer).
Similarly, DEADBEEF would be placed around blocks of allocated memory. When the memory was freed if DEADBEEF wasn't found before or after the block you would know you overran the buffer (or somebody else clobbered your memory which was much much worse).
A large part of the developer community and I believe most of the folks inside Commodore ran Enforcer all the time - in this way we bug checked each others code even as we developed our own code. THIS is why the Amiga was so reliable - community based bug hunting. Sure the community basis was sort of necessary (because of the lack of memory isolation) but it was also ingrained in the Amiga culture of sharing.
-
What a heartwarming story :)
For anyone interested, the modern Enforcer is called MuGuardianAngel and it is awesome.
-
I love hearing about this kind of stuff.
-
Many people-on this board included- have been highly critical of the Amiga's lack of memory protection, and how a single program could bring down the entire system. You know the whole "you'll lose data if it crashes" thing. Well I've kept telling them, yes thats true, but no it didn't happen anywhere near as much as you think it did. This goes some way towards explaining why my A4000 68060 with CV 64 would run for weeks without a reboot.
-
I use DEADBEEF as a routing segments for linking two (or more) IPX segments over WAN - some are still in operation. Have to admit though that I didn't remember where it was coming from... :D
-
I've used 0xDEADBEEF as a "magic" number for various purposes in many bits of code :)
With the advent of the 68020 though, I can see it would be more difficult to trap data accesses since the 020+ allows misaligned access to data.
-
The 68K could not use an odd number as an address of data or instruction. Encountering an odd numbered address was an instant Guru Meditation.
For data 68000 and 68010 only. 68020 and up handle odd pointers just fine (albeit a bit slowly). Obviously branch (jsr, jmp, rts, rte and so on) to odd pointers would crash as usual.
While Enforcer is quite nice I would give my left kidney for valgrind (http://valgrind.org/).
-
I would give my left kidney for valgrind (http://valgrind.org/).
Is that a bounty request? :laughing: