[BUG] poweroff command in ./u-boot -T -l causes SIG_SEGV
Heinrich Schuchardt
xypron.glpk at gmx.de
Sat Oct 22 11:14:34 CEST 2022
Hello Simon,
when running ./u-boot -T -l and issuing the poweroff command a crash occurs:
os_exit() results in std::ostream::flush() calling U-Boot's fflush with
file = -138447008 (or any other negative number)
Man fflush shows the following definition:
int fflush(FILE *stream);
U-Boot's fflush() is defined as
void fflush(int file);
The pointer FILE *stream is truncated to int which may result in a
negative number when invoking U-Boot's fflush() but anyway we want
std::ostream::flush() to invoke glibc's fflush().
Can we ensure correct linking or do we have to rename fflush()?
Best regards
Heinrich
More information about the U-Boot
mailing list