I will do one higher than “a random piece of code that nobody touches simply because it works”.
In the middle to late 80s, I worked on a product that contained concerning 2 million lines of code written in several languages - COBOL, C, PL/1, BASIC, and computer programmer. The code had been force along from totally different many various many alternative} comes done by different teams within the company, and somewhere within the method of actuation it all at once a number of supply files for tiny modules were lost. no one troubled concerning the missing supply as a result of these very little modules “just worked”.
One day, i used to be known as in to analyze a drag that was occurring on only 1 host in our in-company trial run network. On simply that one explicit system, all messages were suddenly displaying the date “8/8/88”. the information was correct on disk. The computer program showed ME that it had been correct in memory when it had been browse from disk. The computer program showed ME that it had been correct going into a module that performed a knowledge kind conversion and was incorrect kicking off. This was one in all the modules with the missing supply, thus I single-stepped at code level within the computer program and used a manual to work out the opcodes and arguments and check the result registers and memory locations at every step. I found a step that ought to have modified a register worth however didn’t. Instead, it left the register’s previous worth unchanged, which worth happened to invariably be 0x08080808. I prompt that they run nosology on the machine, as a result of this instruction was clearly failing mutely. The nosology tested ME right; there was a nasty bit within the hardware code memory, and this caused the instruction to become a no-op.
But this was very a hardware problem; it wasn’t a bug within the code. Hardware issues leading to package giving incorrect results square measure Associate in Nursing implausibly rare factor for a applied scientist to run into, which half could be a laugh on its own, however that’s not wherever this story concluded.
Since I had effectively disassembled most of the module, I patterned that I ought to produce a replacement computer program me supply file for it. I went ahead with it, decoded the remainder of the directions, and that i saw what seemed to be a drag that may crash the code if the input wasn’t double-word aligned. I engineered our product with disassembled supply and everything worked, however I couldn’t shake the sensation that i used to be viewing a bug. I engineered a driver for that module and fed within the non-aligned information and it crashed as I expected. It did this with the previous binary object file and with the thing engineered from my new supply.
The reason this module “just worked” was that it had been solely being known as from COBOL code that invariably double-word aligned that information kind. At that time, we have a tendency to we have a tendency tore doing most of our new code in C and that i quickly verified that our compiler wouldn't guarantee double-word alignment if we ever needed to decision that specific module. The module was a part of our codebase, and sooner or later someone was getting to decision it from C.
So, the tip result's that I mounted a bug in a very random piece of code {that no one |that no-one} bites as a result of nobody may touch it, and that we had all thought that “it simply works”.
In the middle to late 80s, I worked on a product that contained concerning 2 million lines of code written in several languages - COBOL, C, PL/1, BASIC, and computer programmer. The code had been force along from totally different many various many alternative} comes done by different teams within the company, and somewhere within the method of actuation it all at once a number of supply files for tiny modules were lost. no one troubled concerning the missing supply as a result of these very little modules “just worked”.
One day, i used to be known as in to analyze a drag that was occurring on only 1 host in our in-company trial run network. On simply that one explicit system, all messages were suddenly displaying the date “8/8/88”. the information was correct on disk. The computer program showed ME that it had been correct in memory when it had been browse from disk. The computer program showed ME that it had been correct going into a module that performed a knowledge kind conversion and was incorrect kicking off. This was one in all the modules with the missing supply, thus I single-stepped at code level within the computer program and used a manual to work out the opcodes and arguments and check the result registers and memory locations at every step. I found a step that ought to have modified a register worth however didn’t. Instead, it left the register’s previous worth unchanged, which worth happened to invariably be 0x08080808. I prompt that they run nosology on the machine, as a result of this instruction was clearly failing mutely. The nosology tested ME right; there was a nasty bit within the hardware code memory, and this caused the instruction to become a no-op.
But this was very a hardware problem; it wasn’t a bug within the code. Hardware issues leading to package giving incorrect results square measure Associate in Nursing implausibly rare factor for a applied scientist to run into, which half could be a laugh on its own, however that’s not wherever this story concluded.
Since I had effectively disassembled most of the module, I patterned that I ought to produce a replacement computer program me supply file for it. I went ahead with it, decoded the remainder of the directions, and that i saw what seemed to be a drag that may crash the code if the input wasn’t double-word aligned. I engineered our product with disassembled supply and everything worked, however I couldn’t shake the sensation that i used to be viewing a bug. I engineered a driver for that module and fed within the non-aligned information and it crashed as I expected. It did this with the previous binary object file and with the thing engineered from my new supply.
The reason this module “just worked” was that it had been solely being known as from COBOL code that invariably double-word aligned that information kind. At that time, we have a tendency to we have a tendency tore doing most of our new code in C and that i quickly verified that our compiler wouldn't guarantee double-word alignment if we ever needed to decision that specific module. The module was a part of our codebase, and sooner or later someone was getting to decision it from C.
So, the tip result's that I mounted a bug in a very random piece of code {that no one |that no-one} bites as a result of nobody may touch it, and that we had all thought that “it simply works”.
No comments:
Post a Comment