Invalid address alignment is caused when you perform operations on a data object that is not aligned at the right boundaries. For example, attempting to read a int (32 bits or 4 bytes) and the address is not at a 4-byte boundary. The same would go for pointers (4-byte or 8-byte), longs (4-byte or 8-byte), and shorts (2-byte). The SIGBUS error commonly occurs through function calls which have pointer arguments.
Here is an example that will cause a SIGBUS error:
main()
{
int *x;
char buf[100];
x = &buf[3];
*x = 10000;
}
In this example, the line "*x = .." will cause a SIGBUS because x is pointing
to the address of &buf[3] which is clearly not at an int(4-byte) boundary.
Note that changing 3 to either 4 or 8 would probably allow the code to
run without problems.
For more information see signal(5). For OSF1 alpha systems also see uac(1).