> ----------
> From: Glynn Clements[SMTP:[EMAIL PROTECTED]]
> Reply To: Glynn Clements
> Sent: 9. november 1998 10:07
> To: [EMAIL PROTECTED]
> Cc: Linux C Programming List
> Subject: Re: Bus error.
>
>
> CyberPsychotic wrote:
>
> > however, why would generate bus error? I was told that this happens when
> > data is not 'aligned' to 16/32/XX frame. Could anyone please clarify
> this
> > thing?
>
> The 80x86 architecture doesn't require that word accesses are aligned
> to 4-byte boundaries (although you can force this to be the case by
> setting a flag in the descriptor table entry, Linux doesn't do this).
>
> Searching for SIGBUS in the kernel source code indicates that it
> occurs for certain types of access to non-existent pages (although
> this more usually results in a SIGSEGV).
>
probably a stupid question:
I've only seen a bus error once, which was when demonstrating memory
protection and debugging in a "real operating system" to a collegue. I wrote
to an *int initialised to a random value (probably 0x12345678) and the
program came down with a bus error, _but_it_didnt_dump_core_, which was a
bit annoying, as I would have shown using gdb on a core dump. Why didnt it
dump core ? (yes, core dump max _is_ set to "unlimited")
Niels HP
[EMAIL PROTECTED]
> In this case, the most likely candidate is trying to access a
> non-existent stack page (exception 12).
>
> --
> Glynn Clements <[EMAIL PROTECTED]>
>