Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logger: convert: Fix compile time error with newer toolchain #8778

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

dbaluta
Copy link
Collaborator

@dbaluta dbaluta commented Jan 23, 2024

Using Compiler version: aarch64-poky-linux-gcc (GCC) 13.2.0 we get the following error:

tools/logger/convert.c: In function 'convert':
tools/logger/convert.c:357:34: error: '%*s' directive output between 4294967264 and 4294967284 bytes exceeds 'INT_MAX' [-Werror=format-overflow=]
|   357 |                 fprintf(out_fd, "%*s(us)%*s  ", -ts_width, " TIMESTAMP", ts_width, "DELTA");
|       |                                  ^~~                       ~~~~~~~~~~~~
| In file included from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/recipe-sysroot/usr/include/stdio.h:964,
|                  from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.h:13,
|                  from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.c:21:
| In function 'fprintf',

Using Compiler version: aarch64-poky-linux-gcc (GCC) 13.2.0
we get the following error:

tools/logger/convert.c: In function 'convert':
tools/logger/convert.c:357:34: error: '%*s' directive output between 4294967264 and 4294967284 bytes exceeds 'INT_MAX' [-Werror=format-overflow=]
|   357 |                 fprintf(out_fd, "%*s(us)%*s  ", -ts_width, " TIMESTAMP", ts_width, "DELTA");
|       |                                  ^~~                       ~~~~~~~~~~~~
| In file included from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/recipe-sysroot/usr/include/stdio.h:964,
|                  from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.h:13,
|                  from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.c:21:
| In function 'fprintf',

Signed-off-by: Daniel Baluta <[email protected]>
Signed-off-by: Marc Herbert <[email protected]>
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkpatch warnings could be fixed but they're not important.

@marc-hb
Copy link
Collaborator

marc-hb commented Jan 23, 2024

The commit subject could also be a bit more specific...

@dbaluta I trust you actually tested this PR, not just compile-tested? For more coverage you could submit a draft/throw-away PR to the stable-v2.2 branch where the Intel CI still uses sof-logger.

Funny enough, there is a check-sof-logger failure in:
https://sof-ci.01.org/sofpr/PR8778/build2155/devicetest/index.html?model=TGLU_RVP_NOCODEC-ipc4&testcase=check-sof-logger
However this platform does not use the sof-logger at all. Someone just messed up the platform configuration:

grep sof_debug /etc/modprobe.d/*
sof_debug.conf:options snd_sof sof_debug=0x800
sof_debug.conf:#options snd_sof sof_debug=0x441

Other failures are known.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wszypelt @lrudyX good to merge ?

@wszypelt
Copy link

@lgirdwood Internal Intel CI system, all green

@dbaluta dbaluta merged commit ff9343a into thesofproject:main Jan 25, 2024
37 of 44 checks passed
@marc-hb
Copy link
Collaborator

marc-hb commented Feb 6, 2024

So this PR likely broke the -g option which sets config->precision to -1... tentative fix from @abonislawski in #8839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants