Opened 6 years ago

Closed 6 years ago

#2101 closed enhancement (fixed)

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 (1)

comment:1 Changed 6 years ago by nanang

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

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.