Skip to content

thread safety #279

Description

@umlaeute

(this was originally reported as https://bugs.debian.org/#761307)

I see you wrote on http://comments.gmane.org/gmane.comp.audio.libsndfile.devel/564

"SNDFILE handles should not be accessed by multiple threads unless
you have a locking mechanism around all uses of the handle.
However, it is possible to open multiple SNDFILE handles to the
same underlying file and operate on them accross multiple
threads."

This would be fine, but there are some global/static variables which break thread-safety. So far I found sf_errno, sf_logbuffer, sf_syserr which apparently are used only during opening, including sf_strerror(NULL) and sf_command(NULL, SFC_GET_LOG_INFO, ...).

So I conclude opening even different sound files concurrently is not thread-safe!

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions