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

Bug#812928: udev: cdrom_id terminated by signal BUS



Control: tag -1 moreinfo

On Wed, 2016-01-27 at 23:54 +0100, Marco d'Itri wrote:
> Control: reassign -1 src:linux
> Control: found -1 4.3.0-1
> Control: retitle -1 getauxval(AT_RANDOM) broken on sparc64
> 
> On Jan 27, Anatoly Pugachev <matorola@gmail.com> wrote:
> 
> > Program terminated with signal SIGUSR1, User defined signal 1.
> > #0  0x000001000001b9b8 in initialize_srand () at src/basic/random-
> > util.c:107
> > 107                     x ^= *(unsigned*) auxv;
> > (gdb) bt
> Looks like getauxval(AT_RANDOM) returns garbage on sparc64:
>
>         x = 0;
>         auxv = (void*) getauxval(AT_RANDOM);
>         if (auxv)
>                 x ^= *(unsigned*) auxv;

There is no documented alignment guarantee for the AT_RANDOM bytes so I
think this caller is wrong to treat it as an array of unsigned int.
What happens if you change it to:

	if (auxv)
		memcpy(&x, auxv, sizeof(x));

?

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: