Search

Sponsored Links

Meta

Categories

Archives

Recent Posts

RSS Feeds

14
Feb

Bus Error

Related Blog Items

Bus error occurs when hardware tells the OS about a problematic memory reference.  In practice, a bus error is almost always caused by a misaligned read or write.  It’s called a bus error, because the address bus is the component that chokes if a misaligned load or store is requested.

union {
    char a[10];
    int i;
}u;

A bus error can also be generated by referencing memory that does not physically exist.

Alignment means that data items can only be stored at an address that is multiple of their size.

A program to cause a bus error is:

int *p = (int*) &(u.a[1]);
*p = 17;        /* the misaligned addr is p causes a bus error */

Simply, a bus error means that the CPU disliked something about that memory reference, while segv means that the MMU disliked something about it.

Popularity: 8%

You need to log on to convert this article into PDF


Related Blog Items

4 Comments

  • Pratap  said:

    Any ideas to identify the exact DIMM slot of the incorrect memory reference,which lead to Bus error


  • ponnada  said:

    As DIMM slot map to address range, I think we need to identify based on the address…


  • Pratap  said:

    Ponnada..please let me know,if you know any method to figure out the incorrect memory reference to the its DIMM slot level.


  • ponnada  said:

    pratap,
    if you are talking about incorrect memory reference (by a program) to a good DIMM slot, then depending on the address (incorrect reference) we can identify the DIMM slot (which is a memory bank, and will have a address range), if you are talking about identifying a incorrect/bad DIMM slot in all DIMM slots, we can use trail and error method to find out the bad slot (with bad DIMM slot we can not boot even (not sure though)). thanks.


Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image