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

event_process_active_single_queue: Use of memory after it is freed #1638

Closed
Coeur opened this issue May 1, 2024 · 0 comments · Fixed by #1642
Closed

event_process_active_single_queue: Use of memory after it is freed #1638

Coeur opened this issue May 1, 2024 · 0 comments · Fixed by #1642

Comments

@Coeur
Copy link
Contributor

Coeur commented May 1, 2024

This is an Xcode (clang) analyzer warning.
Capture d’écran 2024-05-01 à 21 32 58
Capture d’écran 2024-05-01 à 21 35 09
Capture d’écran 2024-05-01 à 21 35 35

It's reported in event_process_active_single_queue on line 1681 (with the free being mm_free(ev); on line 1748):

libevent/event.c

Line 1681 in eec47a6

if (evcb->evcb_flags & EVLIST_INIT) {

The 20 numbers of the screenshots are:

  1. Assuming 'activeq' is not equal to null
  2. Entering loop body
  3. Assuming the condition is true
  4. Assuming the condition is false
  5. Assuming the condition is false
  6. Assuming 'event_debug_logging_mask_' is 0
  7. Assuming the condition is false
  8. Assuming the condition is false
  9. Assuming field 'th_base_lock' is null
  10. Calling 'event_mm_free_'
  11. Entered call from 'event_process_active_single_queue'
  12. Assuming 'mm_free_fn_' is null
  13. Memory is released
  14. Returning; memory was released via 1st parameter
  15. Assuming field 'event_break' is 0
  16. Assuming 'count' is < 'max_to_process'
  17. Assuming field 'event_continue' is 0
  18. Looping back to the head of the loop
  19. Entering loop body
  20. Use of memory after it is freed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant