Pergunta

While investigating Wikipedia article on Qantas Flight 72 I've found "Potential trigger types" section that says (emphasis mine):

A number of potential trigger types were investigated, including software bugs, software corruption, hardware faults, electromagnetic interference and the secondary high-energy particles generated by cosmic rays.

I wonder if there is any distinctive and ultimate difference between "bug" and "corruption" (if yes, then what is the difference) or is this just an article's wording and nothing else?

Foi útil?

Solução

Software corruption is the contrary of software integrity. It's the same thing as data corruption, except that the data is the software code.

It can affect:

  • the software binary stored in memory: binary codes of software instructions are altered for example because of physical interference (“please switch off electronic devices during take-off and landing”), hardware defects (memory chip), malicious activities (e.g. row hammer vulnerability), or software bugs (i.e. as a consequence of a buffer overflow).
  • the software binary before it is loaded in memory, i.e. the executable file stored in a file system (e.g. SSD memory, hard disk, ...) or transiting via the network (e.g. loaded from a remote file server).
  • the software source code before the executable is produced: the source code is data like any other, that can be corrupted in the same situation as any data. A typical example is when a software company’s source code repository gets hacked (accidental cases generally prevent compilation and have a very limited impact)

Note that “software corruption” may be used ambiguously to mean corruption caused by the software instead of corruption of the software itself.

Outras dicas

You can fix corruption by restoring from a good back up. Corruption means some of the bits somehow got changed from what they were meant to be.

You can fix a bug* by doing more development and redeploying. Here the bits are what they were meant to be. They just don’t do what we need them to do.

*Of course this assumes that bug means a defect in source code, not a moth stuck between relay contacts.

A bug is when a software does exactly what the programmer told it to do, instead of what the programmer wanted it to do.

A corruption is when a software does something else than what the programmer told it to do, possibly due to hardware failure, or other problems not directly related to software development.

Presumably what they mean by "software corruption" is unintended changes to the contents of an executable file due to things like a failure of the storage media.

A "bug" would mean that the binaries are the same as the originals which were provided by the software vendor or developer, but that there was some programming error which means they don't behave exactly as intended.

I write a program, it gets compiled, sent to you, you install it on your computer. But a few bits have changed on the way. That is software corruption.

A bug is a mistake made by a software developer.

Corruption is not a mistake by a developer; it is when something alters the program after (or during) delivery — even something accidental/benign like failing storage or network transmission error.

Since 2003, the term corruption in software has also been associated with undesirable coupling between two software modules. DDD prescribes the creation of an anticorruption layer (ACL) between two software systems (or "bounded contexts" in DDD terms). If system A needs to interact with system B, and B's API uses different design standards, data structures and formats, an ACL may prevent elements of B's API to spread and "corrupt" components in A.

This use of the term "corruption" was clearly not the intent in the Qantas Flight 72 article, but it helps to clarify common terminology. Or so I hope.

Licenciado em: CC-BY-SA com atribuição
scroll top