Skip to content

tests/malloc_thread_safety: new test#15598

Closed
maribu wants to merge 1 commit intoRIOT-OS:masterfrom
maribu:malloc-thread-safety
Closed

tests/malloc_thread_safety: new test#15598
maribu wants to merge 1 commit intoRIOT-OS:masterfrom
maribu:malloc-thread-safety

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Dec 9, 2020

Contribution description

This PR adds a test application to confirm an issue with multithreaded use of standard C library functions, specifically malloc() and free().

Testing procedure

The automated tests should fail for all platforms but AVR and ESP32/ESP8266: AVR has special wrapper for calls to malloc() and free() to prevent memory corruptions. ESP* have implement the locking hooks expected by newlib.

Issues/PRs references

Helpful for e.g. testing #8619

@maribu maribu added Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Dec 9, 2020
This test checks whether calling malloc in more than one thread is safe.
@maribu maribu force-pushed the malloc-thread-safety branch from 51fcee0 to b60a343 Compare December 9, 2020 16:44
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Dec 9, 2020

Test result is as it should: The ARM board fails, the ESP platforms have custom guards in place, so the ESP32 board passes.

@maribu
Copy link
Copy Markdown
Member Author

maribu commented Dec 17, 2020

Test merged with the fix. Hence, this PR is no longer needed.

@maribu maribu closed this Dec 17, 2020
@maribu maribu deleted the malloc-thread-safety branch January 25, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant