mltframework / mltframework/mlt

portability issue: locale misuse on OpenBSD

Open
#568 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.9k
Forks
387
Avg merge
17h 28m
Merged PRs (30d)
8

Description

setlocale is never thread-safe. Even with the proper mutex locking, it still leads to memory corruption here.

Right now, OpenBSD doesn't have LC_NUMERIC support, so neutering the support will allow it to run.

src4.txt

Eventually, we might get support for strtod_l and friends.

or you could switch to uselocale() for everything but windows...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached src4.txt and locating the project's locale-handling code for OpenBSD. Confirm how setlocale and LC_NUMERIC are used, then reproduce the memory-corruption or portability problem on OpenBSD. Done means OpenBSD runs without the reported failure while preserving supported locale behavior on other platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.