
22 Oct
2022
22 Oct
'22
11:14 a.m.
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