Bug compatibility

Last updated

Computer hardware or software is said to be bug compatible if it exactly replicates an undesirable feature [1] of a previous version. The phrase is found in the Jargon File. [2]

Contents

An aspect of maintaining backward compatibility with an older system is that such systems' client programs often do not only depend on their specified interfaces but also bugs and unintended behaviour that must also be preserved by the newer replacement. Besides the significantly higher complexity that needs to be maintained during the natural evolution of the code or interface, it can sometimes cause performance or security issues, and the inconsistencies in the behaviour of interfaces can sometimes lead to new bugs in the software using it, creating difficult to resolve multi-directional cross dependencies between various pieces of code. [3]

Examples

DOS

Examples can be found in MS-DOS/PC DOS: When MS-DOS/PC DOS 3.1 and higher (including Windows 9x) and OS/2 detect certain FAT OEM labels, they do not trust some BIOS Parameter Block (BPB) values and recalculate them from other disk geometry parameters in order to work around several off-by-one calculation errors caused by some of their formatter software under earlier issues of these systems. [4] [5] [6] [7] While this undocumented behaviour allows them to cope with these incorrectly formatted volumes specifically, it limits the flexibility of disk geometries they can work with in general and can cause them to trash validly formatted volumes created by third-parties if they deviate from the defaults used by Microsoft and IBM. [6] [7] When MS-DOS/PC DOS 5.0 and higher are running on 286 or higher processors, the resident executable loader contains code specially designed to detect and fix certain widespread applications and stub loaders (such as programs linked with older versions of Microsoft's EXEPACK or Rational Systems' 386 DOS extenders) by patching the loaded program image before executing it. [8] Under certain conditions an underlying DOS also patches Windows (WINA20.386). [9]

Over the course of development, DR-DOS also had to be modified to not only emulate many undocumented peculiarities and undesirable properties of MS-DOS and PC DOS (like having to use certain misleading filenames such as IBMBIO.COM, IBMDOS.COM or COUNTRY.SYS for files which do not follow the specs for executables under DOS, [10] [11] [12] [nb 1] or having to introduce a directory path length-limited Current Directory Structure (CDS) internally [9] [13] [14] ), but also actual bugs in the kernel and several drivers, in order to make certain other drivers and applications run on DR-DOS, when they were tested on specific versions of MS-DOS only. [9] [6] [8] [15] [16] [17]

Windows

Windows, which has traditionally emulated many old system bugs to allow older low-level programs to run, is another example. As a result, Wine, which makes it possible to run many Windows applications on other platforms, also needs to maintain bug compatibility with Windows. [18]

Other

During development of its IBM PC compatible, Compaq engineers found that Microsoft Flight Simulator would not run because of what subLOGIC's Bruce Artwick described as "a bug in one of Intel's chips", forcing them to make their computer bug-compatible with the IBM PC. [19] Another hardware example is found in the design of the IBM Personal Computer/AT A20 address line to emulate the behaviour in older processors. [8] [15]

Microsoft Excel has always had a deliberate leap year bug, which falsely treats 29 February 1900 as an actual date, to ensure backward compatibility with Lotus 1-2-3. [20]

Hyrum Wright, an engineer at Google, talks about this problem that he observed firsthand while working on C++ core libraries. It was Titus Winters, also an engineer at Google, who popularized this concept on a larger scale as "Hyrum's Law". [21]

The HTTP referer header is a misspelling of the word referrer . It was a mistake in the original web proposal, and was kept for compatibility.

See also

Notes

  1. The IBMBIO.COM and IBMDOS.COM files are special binary images containing executable code. Accidentally trying to run them from the prompt as if they were normal COM-style programs would result in the system to crash. This is the reason why these files have the hidden attribute set under MS-DOS/PC DOS. This could have been avoided by choosing other file extensions (like with DRBIOS.SYS and DRBDOS.SYS), but could not be done later on in order to remain compatible with various tools expecting these particular filenames. To eliminate the risk of crashes, these files were changed into fat binaries with DR-DOS 7.02 and higher now including tiny stubs to exit gracefully when invoked inappropriately. [a] [b]

Related Research Articles

<span class="mw-page-title-main">Drive letter assignment</span> Alphabetical assignment to logical drives on computers (e.g., C:\)

In computer data storage, drive letter assignment is the process of assigning alphabetical identifiers to volumes. Unlike the concept of UNIX mount points, where volumes are named and located arbitrarily in a single hierarchical namespace, drive letter assignment allows multiple highest-level namespaces. Drive letter assignment is thus a process of using letters to name the roots of the "forest" representing the file system; each volume holds an independent "tree".

<span class="mw-page-title-main">DR-DOS</span> MSDOS-like operating system

DR-DOS is a disk operating system for IBM PC compatibles, originally developed by Gary A. Kildall's Digital Research, Inc. and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86. Upon its introduction in 1988, it was the first DOS that attempted to be compatible with IBM PC DOS and MS-DOS.

<span class="mw-page-title-main">COMMAND.COM</span> Default command line for MS-DOS and Windows 9x

COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot. As a shell, COMMAND.COM has two distinct modes of operation: interactive mode and batch mode. Internal commands are commands stored directly inside the COMMAND.COM binary; thus, they are always available, but can only be executed directly from the command interpreter.

<span class="mw-page-title-main">High memory area</span> RAM area of an IBM AT or compatible computer

In DOS memory management, the high memory area (HMA) is the RAM area consisting of the first 65520 bytes above the one megabyte in an IBM AT or compatible computer.

CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS during boot. CONFIG.SYS was introduced with DOS 2.0.

<span class="mw-page-title-main">DOSKEY</span>

DOSKEY is a command for DOS, IBM OS/2, Microsoft Windows, and ReactOS that adds command history, macro functionality, and improved editing features to the command-line interpreters COMMAND.COM and cmd.exe.

<span class="mw-page-title-main">Code page 850</span> Computer character set for Latin scripts

Code page 850 is a code page used under DOS operating systems in Western Europe. Depending on the country setting and system configuration, code page 850 is the primary code page and default OEM code page in many countries, including various English-speaking locales, whilst other English-speaking locales default to the hardware code page 437.

ANSI.SYS is a device driver in the DOS family of operating systems that provides extra console functions through ANSI escape sequences. It is partially based upon a subset of the text terminal control standard proposed by the ANSI X3L2 Technical Committee on Codes and Character Sets.

IO.SYS is an essential part of MS-DOS and Windows 9x. It contains the default MS-DOS device drivers and the DOS initialization program.

<span class="mw-page-title-main">IBMBIO.COM</span> System file (DOS BIOS) in PC DOS and DR-DOS

IBMBIO.COM is a system file in many DOS operating systems. It contains the system initialization code and all built-in device drivers. It also loads the DOS kernel (IBMDOS.COM) and optional pre-loadable system components, displays boot menus, processes configuration files and launches the shell.

Virtual DOS machines (VDM) refer to a technology that allows running 16-bit/32-bit DOS and 16-bit Windows programs when there is already another operating system running and controlling the hardware.

MSDOS.SYS is a system file in MS-DOS and Windows 9x operating systems. In versions of MS-DOS from 1.1x through 6.22, the file comprises the MS-DOS kernel and is responsible for file access and program management. MSDOS.SYS is loaded by the DOS BIOS IO.SYS as part of the boot procedure. In some OEM versions of MS-DOS, the file is named MSDOS.COM.

<span class="mw-page-title-main">IBMDOS.COM</span> System file (DOS kernel) in PC DOS and DR-DOS

IBMDOS.COM is the filename of the IBM PC DOS and DR-DOS kernel. Loaded and initially invoked by the DOS BIOS in IBMBIO.COM during the boot process, it contains the hardware-independent parts of the operating system, including the embedded FAT12, FAT16 and, in newer versions, the FAT32 file system code, as well as the code to provide the DOS API to applications.

Long filename (LFN) support is Microsoft's backward-compatible extension of the 8.3 filename naming scheme used in MS-DOS. Long filenames can be more descriptive, including longer filename extensions such as .jpeg, .tiff, and .html that are common on other operating systems, rather than specialized shortened names such as .jpg, .tif, or .htm. The standard has been common with File Allocation Table (FAT) filesystems since its first implementation in Windows NT 3.5 of 1994.

A disk compression software utility increases the amount of information that can be stored on a hard disk drive of given size. Unlike a file compression utility, which compresses only specified files—and which requires the user to designate the files to be compressed—an on-the-fly disk compression utility works automatically through resident software without the user needing to be aware of its existence. On-the-fly disk compression is therefore also known as transparent, real-time or online disk compression.

<span class="mw-page-title-main">Debug (command)</span> Line-oriented debug utility in DOS

The line-oriented debugger DEBUG.EXE is an external command in operating systems such as DOS, OS/2 and Windows.

<span class="mw-page-title-main">MSCDEX</span>

MSCDEX or Microsoft CD-ROM Extensions is a software program produced by Microsoft and included with MS-DOS 6.x and certain versions of Windows to provide CD-ROM support. Earlier versions of MSCDEX since 1986 were installable add-ons for MS-DOS 3.1 and higher.

Ralf Brown's Interrupt List is a comprehensive list of interrupts, calls, hooks, interfaces, data structures, CMOS settings, memory and port addresses, as well as processor opcodes for x86 machines from the 1981 IBM PC up to 2000, most of it still applying to IBM PC compatibles today. It also lists some special function registers for the NEC V25 and V35 microcontrollers.

In computing, LOADHIGH is an internal DOS command in COMMAND.COM that is used to load a program into the upper memory area (UMA) instead of conventional memory.

<span class="mw-page-title-main">DOS</span> Family of IBM PC-compatible operating systems

DOS is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible systems from other manufacturers include DR-DOS (1988), ROM-DOS (1989), PTS-DOS (1993), and FreeDOS (1994). MS-DOS dominated the IBM PC compatible market between 1981 and 1995.

References

  1. "bug-for-bug compatible". catb.org. Same as bug-compatible, with the additional implication that much tedious effort went into ensuring that each (known) bug was replicated.
  2. "Bug-compatible - www.jargon.net" . Retrieved 2010-02-03.
  3. Pontin, Jason (1994-12-26). "Windows 95's third delay; needs polish". InfoWorld. 16 (52). InfoWorld Media Group, Inc.: 18.
  4. Williams, Dave (1992-01-12). Programmer's Technical Reference for MSDOS and the IBM PC. ISBN   1-878830-02-3. DOSREF. Retrieved 2012-01-08. (NB. The author mentions that DOS 4.0 checks the OEM label, but denies that DOS 3.2 checks it as well (although it does).)
  5. Bass, Wally (1994-02-14). "Cluster Size". Newsgroup:  comp.os.msdos.programmer. Archived from the original on 2017-09-09. Retrieved 2006-10-14.
  6. 1 2 3 Paul, Matthias R. (2002-02-20). "Need DOS 6.22 (Not OEM)". alt.msdos.programmer. Archived from the original on 2017-09-09. Retrieved 2006-10-14.
  7. 1 2 Paul, Matthias R. (2004-08-25). "NOVOLTRK.REG". www.drdos.org. Archived from the original on 2016-03-04. Retrieved 2011-12-17.
  8. 1 2 3 Paul, Matthias R. (2002-10-07). "Re: masm .com (PSP) related trouble". alt.lang.asm. Archived from the original on 2017-09-03. Retrieved 2017-09-03.
  9. 1 2 3 Schulman, Andrew; Brown, Ralf D.; Maxey, David; Michels, Raymond J.; Kyle, Jim (1994) [November 1993]. Undocumented DOS: A programmer's guide to reserved MS-DOS functions and data structures - expanded to include MS-DOS 6, Novell DOS and Windows 3.1 (2 ed.). Reading, Massachusetts: Addison Wesley. ISBN   0-201-63287-X. (xviii+856+vi pages, 3.5"-floppy) Errata:
  10. Paul, Matthias R. (1997-10-02). "Caldera OpenDOS 7.01/7.02 Update Alpha 3 IBMBIO.COM README.TXT". Archived from the original on 2003-10-04. Retrieved 2009-03-29.
  11. DR-DOS 7.03 WHATSNEW.TXT - Changes from DR-DOS 7.02 to DR-DOS 7.03. Caldera, Inc. 1998-12-24. Archived from the original on 2019-04-08. Retrieved 2019-04-08.
  12. Paul, Matthias R. (2001-06-10) [1995]. "DOS COUNTRY.SYS file format" (COUNTRY.LST file) (1.44 ed.). Archived from the original on 2016-04-20. Retrieved 2016-08-20.
  13. Paul, Matthias R. (1997-06-07) [April 1994]. "Chapter 1.3.xi: Überlange Pfade". NWDOS7UN.TXT — Zusammenfassung der dokumentierten und undokumentierten Fähigkeiten von Novell DOS 7. MPDOSTIP (in German). Archived from the original on 2016-11-07. Retrieved 2016-11-07.
  14. Paul, Matthias R. (1997-07-30) [1994-05-01]. NWDOS-TIPs Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP (in German) (3 ed.). Archived from the original on 2017-09-10. Retrieved 2014-08-06. (NB. NWDOSTIP.TXT is a comprehensive work on Novell DOS 7 and OpenDOS 7.01, including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)
  15. 1 2 Paul, Matthias R. (2002-02-02). "Treiber dynamisch nachladen (Intra-Segment-Offset-Relokation zum Laden von TSRs in die HMA)" [Loading drivers dynamically (Intra-segment offset relocation to load TSRs into the HMA)]. de.comp.os.msdos (in German). Archived from the original on 2017-09-09. Retrieved 2017-07-02. (NB. Gives a comprehensive overview on the history and "nature" of the HMA and the non-obvious design constraints to be observed when developing resident system extensions to be loaded into the HMA.)
  16. Paul, Matthias R. (2002-04-01). "Fix for CauseWay DOS extender under DR-DOS 7.0x EMM386.EXE". Newsgroup:  comp.os.msdos.programmer. Archived from the original on 2018-09-19. Retrieved 2018-09-19.
  17. Paul, Matthias R. (2001-08-18). "Re: [fd-dev] On GRAFTABL and DISPLAY.SYS (Was: Changing codepages in FreeDOS)". freedos-dev. Archived from the original on 2017-09-04. Retrieved 2017-09-04.
  18. "WineFeatures - The Official Wine Wiki" . Retrieved 2010-02-03.
  19. Yakal, Kathy (January 1985). "Bruce Artwick / The Designer Behind Flight Simulator II". Compute!'s Gazette. p. 32. Retrieved 2014-07-06.
  20. Excel incorrectly assumes that the year 1900 is a leap year. Retrieved 2019-05-01.
  21. "Software Engineering at Google [Book]". www.oreilly.com. Retrieved 2022-05-31.