-
Notifications
You must be signed in to change notification settings - Fork 8.2k
tests: lib: mem_alloc: Fix newlib test #21169
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: lib: mem_alloc: Fix newlib test #21169
Conversation
|
|
|
NOTE: This issue will apply to the Zephyr SDK as well in the near future (see #21098). |
ebda9b6 to
355e88f
Compare
|
The newlib test failure issue has been addressed. This PR can now be merged. |
|
Under what conditions is this failing? we aren't seeing any issues in CI w/sanitycheck on the qemu platforms. |
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.
Marking this 'request for change' while we figure out when this failure is triggered.
@galak It was failing until I added the commit "tests: lib: mem_alloc: Increase malloc heap size for newlib test". Try running the test with only "tests: lib: mem_alloc: Fix incorrect newlib variant usage" and you will see the failure reported in #21167. |
NEWLIB_LIBC_NANO defaults to y when building with a toolchain that supports nano.specs and this was causing the libraries.libc.newlib test to link with the newlib nano variant (libc_nano.a) when it should be linking with the normal newlib (libc.a). By setting CONFIG_NEWLIB_LIBC_NANO=n in prj_newlib.conf, we make sure that the libraries.libc.newlib test links with the normal newlib. For more details, refer to the issue zephyrproject-rtos#21167. Signed-off-by: Stephanos Ioannidis <[email protected]>
The newlib full malloc implementation (i.e. non-nano) requests a relatively large 4096-byte memory chunk through `_sbrk`, which exceeds the configured 512-byte heap size. This commit changes `CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE` from 512 to 8192 in order to increase the size of the heap memory used by the newlib malloc function. For more details, refer to the issue zephyrproject-rtos#21167. Signed-off-by: Stephanos Ioannidis <[email protected]>
355e88f to
f1939c9
Compare
Closes #21167