Ticket #96 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

locked mutex destroyed in dns-sd compat code

Reported by: Lurchi Owned by: lennart
Milestone: Avahi 0.6.17 Component: avahi-compat-libdns_sd
Keywords: Cc:

Description

according to pthread_mutex_destroy(3p): "It shall be safe to destroy an initialized mutex that is unlocked. Attempting to destroy a locked mutex results in undefined behavior."

This may be causing some bugs (have seen some crashes) in the compat code. At least the "DNSServiceProcessResult(...)" function is affected.

Call graph: finish: sdref_unref() sdref_free() pthread_mutex_destroy() -> return, pthread_mutex_unlock()

Oh, and pthread_mutex_unlock uses sdref, which is freed in sdref_free() ...

Change History

Changed 6 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

The fix has already been available in SVN for a while:

http://avahi.org/browser/trunk/avahi-compat-libdns_sd/compat.c

will be contained in the next official release of Avahi.

(please check if it fixes all the issues you pointed out. I think it does, but please check and reopen this bug if necessary!)

Changed 6 years ago by lennart

  • milestone set to Avahi 0.6.17
Note: See TracTickets for help on using tickets.