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

Tests: USB: Move control endpoint buffers to heap #11607

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

fkjagodzinski
Copy link
Member

Description

This fixes a stack overflow error in the basic USB tests.

I updated the ctrl_buf member of the USBTester and USBEndpointTester test classes to be allocated on the heap. This saves 2 KB of a main stack.


The error was discovered on DISCO_L475VG_IOT01A. Bisecting showed that a regression occurred at 84e228a (PR #11136) which increased the size of the USBDevice by 240 B, from 584 to 824. This in turn increased sizes of both test classes that inherit from the USBDevice; to 3048 (from 2808) in case of the USBTester, and 2980 (from 2740) in case of the USBEndpointTester.

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[x] Test update
[ ] Breaking change

Reviewers

@maciejbocianski, @jamesbeyond, @jeromecoutant

Release Notes

This fixes the stack overflow error during the basic USB tests.

Update the ctrl_buf member of the USBTester and USBEndpointTester test
classes to be allocated on the heap. This saves 2 KB of a main stack.
@ciarmcom
Copy link
Member

ciarmcom commented Oct 1, 2019

@fkjagodzinski, thank you for your changes.
@maciejbocianski @jamesbeyond @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@maciejbocianski maciejbocianski left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jamesbeyond jamesbeyond left a comment

Choose a reason for hiding this comment

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

Looks good. I am happy about the changes

@adbridge
Copy link
Contributor

adbridge commented Oct 7, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 7, 2019

Test run: SUCCESS

Summary: 5 of 5 test jobs passed
Build number : 1
Build artifacts

@adbridge adbridge merged commit ef4fe98 into ARMmbed:master Oct 7, 2019
@fkjagodzinski fkjagodzinski deleted the fix-usb_device-basic_test branch October 7, 2019 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants