Ticket #2101 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

Prevent crash due to access to an already destroyed atomic object

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.8
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no


The PJLIB mutex functions all check for NULL mutexes but pj_atomic_destroy() is not setting its mutex to NULL after it destroyed it so any attempts to use the atomic again would cause a crash. This ticket does not address why an attempt was made to use the atomic again but it does prevent the crash.

Thank you George Joseph for the patch.

Change History

comment:1 Changed 9 months ago by nanang

  • Status changed from new to closed
  • Resolution set to fixed

In 5758:

Close #2101:

  • set atomic's mutex to NULL in atomic destroy
  • added few sanity checks to the atomic functions.
Note: See TracTickets for help on using tickets.