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: mem_alloc: workaround aggressive optimization #35571

Conversation

IRISZZW
Copy link
Contributor

@IRISZZW IRISZZW commented May 24, 2021

As we don't use memory allocated in test_calloc, test_no_mem_malloc,
and test_no_mem_realloc. malloc call can be optimized away (that really
happens with ARC MWDT toolchain). That breaks the test. So disable
optimization for these functions.

Fix: #35569
Similar fix: #28614

As we don't use memory allocated in test_calloc, test_no_mem_malloc,
and test_no_mem_realloc. malloc call can be optimized away (that really
happens with ARC MWDT toolchain). That breaks the test. So disable
optimization for these functions.

Signed-off-by: Watson Zeng <[email protected]>
@IRISZZW IRISZZW added area: Toolchains Toolchains area: ARC ARC Architecture labels May 24, 2021
@IRISZZW IRISZZW added this to the v2.6.0 milestone May 24, 2021
@IRISZZW IRISZZW requested a review from nashif as a code owner May 24, 2021 08:38
@github-actions github-actions bot added the area: Tests Issues related to a particular existing or missing test label May 24, 2021
@nashif nashif merged commit fa41ec0 into zephyrproject-rtos:main May 25, 2021
@IRISZZW IRISZZW deleted the topic-mwdt-optimization-fix branch May 31, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARC ARC Architecture area: Tests Issues related to a particular existing or missing test area: Toolchains Toolchains
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/lib/mem_alloc failed with arcmwdt toolchain
4 participants