Re: [PATCH] PM: declare __tracedata symbols as char[] rather than char

From: Rafael J. Wysocki
Date: Sun Feb 21 2016 - 12:43:56 EST


On Sunday, January 24, 2016 08:08:52 PM Eric Biggers wrote:
> Accessing more than one byte from a symbol declared simply 'char' is undefined
> behavior, as reported by UBSAN:
>
> UBSAN: Undefined behaviour in drivers/base/power/trace.c:178:18
> load of address ffffffff8203fc78 with insufficient space
> for an object of type 'char'
>
> Avoid this by declaring the symbols as arrays.
>
> Signed-off-by: Eric Biggers <ebiggers3@xxxxxxxxx>

Queued up for 4.6, thanks!

Rafael