Skip to content

Add announce table culling, fix use-after-free, and refactor build/log#27

Merged
attermann merged 1 commit intomasterfrom
memory_bugs
Mar 1, 2026
Merged

Add announce table culling, fix use-after-free, and refactor build/log#27
attermann merged 1 commit intomasterfrom
memory_bugs

Conversation

@attermann
Copy link
Owner

  • Add cull_announce_table() with OOM-safe min_element fallback, matching pattern from cull_path_table() and cull_known_destinations()
  • Call cull immediately after every announce/path/known-destination insert
  • Fix use-after-free: guard announce_entry access with announce_erased flag
  • remove_path() now also deletes cached packet files
  • Path table insert now removes existing entry first to prevent duplicates
  • Rename env:mcu -> env:embedded; add env:native_debug and heltec_wifi_lora_32_V4
  • Make TLSF buffer size configurable via RNS_TLSF_BUFFER_SIZE macro
  • Refactor log macros to unified RNS::log() path; add doHeadLog with callback support
  • Prefix all bad_alloc error messages with "bad_alloc -" for easier grepping

- Add cull_announce_table() with OOM-safe min_element fallback, matching pattern from cull_path_table() and cull_known_destinations()
- Call cull immediately after every announce/path/known-destination insert
- Fix use-after-free: guard announce_entry access with announce_erased flag
- remove_path() now also deletes cached packet files
- Path table insert now removes existing entry first to prevent duplicates
- Rename env:mcu -> env:embedded; add env:native_debug and heltec_wifi_lora_32_V4
- Make TLSF buffer size configurable via RNS_TLSF_BUFFER_SIZE macro
- Refactor log macros to unified RNS::log() path; add doHeadLog with callback support
- Prefix all bad_alloc error messages with "bad_alloc -" for easier grepping
@attermann attermann merged commit 3babdc0 into master Mar 1, 2026
4 checks passed
@attermann attermann deleted the memory_bugs branch March 1, 2026 03:03
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.

1 participant