Skip to content
Commit dc4e331e authored by Martin Åberg's avatar Martin Åberg Committed by Anas Nashif
Browse files

logging: improve string logging on 64-bit ABI



In std_print(), the log arguments were casted to uint32_t before
being sent further to the output function.

For integer types which can not be represented by uint32_t, the
degraded user experience may be acceptable.

However, for string arguments, the output function will eventually
dereference the pointer, so if the "char *" can not be represented
by uint32_t, bad things are going to happen. In practice you will see
this on 64-bit systems where sizeof (char *) is 8 byte and addresses
higher than 0x80000000.

Signed-off-by: default avatarMartin Åberg <martin.aberg@gaisler.com>
parent 9d1dd9a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment