-
Notifications
You must be signed in to change notification settings - Fork 349
testbench: improvements for valgrind and debug #4408
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
Changes from all commits
29453c3
5c27ab0
a44ddb6
ab08c34
65c2b3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,7 +137,7 @@ int load_buffer(void *dev, int comp_id, int pipeline_id, | |
| struct snd_soc_tplg_dapm_widget *widget) | ||
| { | ||
| struct sof *sof = (struct sof *)dev; | ||
| struct sof_ipc_buffer buffer; | ||
| struct sof_ipc_buffer buffer = {0}; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't the job of
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. testbench does not use all the data members as some are specific to HW config. This was only missing from the two "IPCs" in this PR.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand sorry, I don't have the full picture. What was the error reported and in which function?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use of uninitialized data in FW buffer logic due to testbench not initializing it. Not an issue with kernel as it clears. Testbench bug.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understood that the error was testbench specific, my concern is that this change hides any "real" initialization bug in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got you now, yep the userspace tplg parser is not setting any variables if it cant find tokens for them. I will fix this as another PR as it means removing more testbench code here and also testing other tools that used the shared tplg parser. |
||
| int size = widget->priv.size; | ||
| int ret; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the initialization of some field(s) is missing below and this is merely hiding the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto as above.