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

Fix -Werror=free-nonheap-object warning as error and add support for RVCT 4.1 ARM compiler #2268

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

djbn65
Copy link
Contributor

@djbn65 djbn65 commented Mar 21, 2024

When building the perftest, schematest.cpp was yielding an error in relation to freeing a stack object. This change fixes that by explicitly passing in nullptr to CrtAllocator::Free if we don't own the memory.

Fixes: #2267

When building the perftest, schematest.cpp was yielding an error in
relation to freeing a stack object. This change fixes that by explicitly
passing in nullptr to CrtAllocator::Free if we don't own the memory.

Change-Id: Ide53cc324af1ae3fef3d9096684e3aac0c1427ff
@djbn65
Copy link
Contributor Author

djbn65 commented Mar 22, 2024

std::free(nullptr)

is also safe and does not invoke undefined behavior as per the standard.

@djbn65
Copy link
Contributor Author

djbn65 commented Mar 22, 2024

@miloyip, @tencent-adm, this patch should be ready to go

djbn65 and others added 2 commits May 29, 2024 10:25
This change adds the necessary preprocessor checks to support the
RVCT 4.1 ARM compiler.

Change-Id: I9b516af326aef08aaafda00a5f89b125d39b1f04
@djbn65
Copy link
Contributor Author

djbn65 commented May 29, 2024

Added another commit to the PR to support the RVCT 4.1 ARM compiler with some preprocessor checks

@djbn65 djbn65 changed the title Fix -Werror=free-nonheap-object warning as error Fix -Werror=free-nonheap-object warning as error and add support for RVCT 4.1 ARM compiler May 29, 2024
@djbn65
Copy link
Contributor Author

djbn65 commented May 29, 2024

@miloyip, @tencent-adm, this is ready to go

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.

-Werror=free-nonheap-object in allocators.h line 271
1 participant