| |
|
|
|
|
greater-sized object at an odd char address). Problem: this fails on many (esp. RISC) architectures better optimized for HLL execution speed, and can cause an illegal address fault or bus error. |
|
|
|
|
| |
|
|
|
|
The (related) assumption that there is no padding at the end of types and that in an array you can thus step right from the last byte of a previous component to the first byte of the next one. This is not only machine- but compiler-dependent. |
|
|
|
|
| |
|
|
|
|
The assumption that memory address space is globally flat and that the array reference foo[-1] is necessarily valid. Problem: this fails at 0, or other places on segment-addressed machines like Intel chips (yes, segmentation is universally considered a brain-damaged way to design machines (see moby), but that is a separate issue). |
|
|
|
|
| |
|
|
|
|
The assumption that objects can be arbitrarily large with no special considerations. Problem: this fails on segmented architectures and under non-virtual-addressing environments. |
|
|
|
|
| |
|
|
|
|
The assumption that the stack can be as large as memory. Problem: this fails on segmented architectures or almost anything else without virtual addressing and a paged stack. |
|
|
|
|
| |
|
|
|
|
The assumption that bits and addressable units within an object are ordered in the same way and that this order is a constant of nature. Problem: this fails on big-endian machines. |
|
|
|
|
| |
|
|
|
|
The assumption that it is meaningful to compare pointers to different objects not located within the same array, or to objects of different types. Problem: the former fails on segmented architectures, the latter on word-oriented machines or others with multiple pointer formats. |
|
|
|
|
| |
|
|
|
|
The assumption that an int is 32 bits, or (nearly equivalently) the assumption that sizeof(int) == sizeof(long). Problem: this fails on PDP-11s, 286-based systems and even on 386 and 68000 systems under some compilers. |
|
|
|
|
| |
|
|
|
|
The assumption that argv is writable. Problem: this fails in many embedded-systems C environments and even under a few flavors of Unix. |
|
|
|
|