Re: Bug#572512: module-init-tools: depmod unaligned trap on alpha

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


You made alpha users sad.

----- Forwarded message from Michael Cree <mcree@xxxxxxxxxxxx> -----

From: Michael Cree <mcree@xxxxxxxxxxxx>
To: md@xxxxxxxx
CC: Meelis Roos <mroos@xxxxxxxx>, 572512@xxxxxxxxxxxxxxx,
	debian-alpha@xxxxxxxxxxxxxxxx
Subject: Re: Bug#572512: module-init-tools: depmod unaligned trap on alpha

On 15/04/10 20:53, Marco d'Itri wrote:
> On Apr 15, Meelis Roos<mroos@xxxxxxxx>  wrote:
>
>>>> Please find out exactly which operation is causing the traps.
>>> Are there any news?

I just found a moment to look at this:


Core was generated by `depmod -a'.
Program terminated with signal 10, Bus error.
#0  0x000000012000e34c in native_endianness () at ../util.c:205
205		return (char) *((uint32_t*)("\1\0\0\2"));
(gdb) bt
#0  0x000000012000e34c in native_endianness () at ../util.c:205
#1  0x000000012000738c in main (argc=2, argv=0x11facdc98) at  
../depmod.c:1312
(gdb) list
200	int __attribute__ ((pure)) native_endianness()
201	{
202		/* Encoding the endianness enums in a string and then reading that
203		 * string as a 32-bit int, returns the correct endianness  
automagically.
204		 */
205		return (char) *((uint32_t*)("\1\0\0\2"));
206	}


Yeah, nice programming guys.  Allocate a string, i.e. an array of
char, which the compiler will merely byte align and then read it
back as a long word which must be long word aligned.  And the
programmer thinks he is so smart that he descibes it
as "automagically"!  Doh.

Cheers
Michael.

----- End forwarded message -----

-- 
ciao,
Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [16.7MP]

Add to Google Powered by Linux