Ticket #1297 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

strerror may be not thread safe

Reported by: courmisch Assigned to: courmisch
Priority: high Milestone: 0.9.0 bugs
Component: LibVLC Version: master
Severity: critical Keywords:
Cc: Platform(s): Linux
Difficulty: unknown Work status: Not started

Description (Last modified by funman)

Some libraries used by VLC use strerror() which may be not thread-safe, at least on Linux it is not.

See http://www.opengroup.org/onlinepubs/000095399/functions/strerror.html for correct use of strerror_r()

Ideally all these libs should be patched, the patches put into extras/contrib/src/Patches, and sent to the maintainers.

The problem is that strerror_r() doesn't exist on all platforms, and GNU Libc has a prototype different from POSIX one: char *strerror_r(int errnum, char *buf, size_t buflen);

Note that GLibc strerror_r() may, or may not use the supplied buffer *buf.

Change History

18/09/07 17:44:47 changed by courmisch

(In [22147]) Fix the most common strerror() usages (threads, network, input) - refs #1297

18/09/07 17:52:23 changed by courmisch

(In [22148]) Remove remaining strerror() calls from core - refs #1297

18/09/07 18:20:51 changed by courmisch

(In [22151]) Replace strerror() with %m (or Linux DVB: strerror_r) - refs #1297

18/09/07 18:32:17 changed by courmisch

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

(In [22153]) Remove last occurences - fixes #1297

18/09/07 21:38:16 changed by funman

  • status changed from closed to reopened.
  • description changed.
  • platform changed from Linux to all.
  • component changed from LibVLC to Contribs.
  • summary changed from strerror segmentation fault to strerror may be not thread safe.
  • priority changed from high to normal.
  • difficulty changed from unknown to easy.
  • milestone changed from 0.9.0 bugs to Bugs paradize.
  • resolution deleted.
  • severity changed from critical to normal.

23/09/07 18:21:29 changed by courmisch

  • status changed from reopened to closed.
  • severity changed from normal to critical.
  • platform changed from all to Linux.
  • component changed from Contribs to LibVLC.
  • priority changed from normal to high.
  • difficulty changed from easy to unknown.
  • resolution set to fixed.

This bug is fixed. Open a NEW one if you need to report ANOTHER problem.

23/09/07 18:21:38 changed by courmisch

  • milestone changed from Bugs paradize to 0.9.0 bugs.