Commit Graph

15 Commits

Author SHA1 Message Date
Konstantin Kondrashov
9d2d32524b fix(esp_event): prevent UAF race between post and loop delete (SEC-222)
esp_event_post_to() could access loop->queue / loop->mutex after
esp_event_loop_delete() freed them when both ran concurrently.

Introduce esp_event_loop_state_t with:
- posts_in_flight: reference-count incremented atomically (under
  state.lock spinlock) before touching any loop resources, decremented
  on every exit path via goto on_err.
- deleting: atomic_bool set by esp_event_loop_delete() to block new
  posts from entering the critical section.

esp_event_loop_delete() sets deleting=true, then busy-waits (releasing
and re-acquiring loop->mutex each tick) until posts_in_flight reaches
zero before proceeding with teardown.

esp_event_isr_post_to() performs a lock-free atomic_load of deleting as
a best-effort guard; ISR context cannot participate in the spinlock
protocol but the window is documented and accepted.
2026-07-21 15:25:58 +03:00
igor.udot
4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Konstantin Kondrashov
889a381153 feat(esp_event): Update depends_components
Where esp_event is used as depends_components:
- components/esp_event/test_apps
- components/esp_event/host_test
- examples/system/esp_event
2025-11-25 19:23:55 +02:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Erhan Kurubas
f4acf0b378 refactor(espcoredump): format coredump component with astyle 2024-02-19 21:57:28 +01:00
Jakob Hasse
417de470ec change(esp_event): reformat files with astyle 2024-01-31 11:07:07 +08:00
Ivan Grokhotkov
79a2c15477 ci(esp_event): upgrade host test to Catch2 as a component, fix build
- use espressif/catch2 component
- fix build issues after FreeRTOS upgrade
- enable test app build in CI
2023-11-29 12:38:46 +01:00
Fu Hanxi
b02687a6c4 test: migrate linux target host test jobs into pytest-embedded 2023-01-16 10:25:55 +08:00
Ivan Grokhotkov
66554aa215 cmake: remove unused defines from several host test apps
These macros are seemingly only used in the NVS host test, and are not
necessary in the other host test apps.
2022-09-20 11:35:45 +02:00
Fu Hanxi
c0568611dd docs: changes docs supported targets tables 2022-07-14 08:26:32 +08:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
Sudeep Mohanty
40c1f3e06e freertos: update module handles to struct type
This commit updates the handles for the timer, task and event_group
modules to struct type. This matches upstream freertos source.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-12-06 08:37:06 +05:30
Jakob Hasse
88eb4fa6a6 [mocks]: moved mocks dir to tools/ 2021-08-10 14:45:42 +08:00
Jakob Hasse
c9984faaef [mocks]: freertos mock
[esp_event]: added preliminary host-based tests
2021-08-06 17:08:21 +08:00