Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Inconsistent run-time library usage for locale handling breaks GPU code generation on some systems.

Open Beginner friendly
#2,351 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp

Research direction

Start with the 12 std::to_string call sites listed in ops/fixedfunction/FixedFunctionOpGPU.cpp and ops/gradingtone/GradingToneOpGPU.cpp, then read the existing getFloatString() and FloatToString() helpers in ParseUtils.cpp. Verify the affected GPU paths under comma-decimal locales and confirm generated GLSL/HLSL uses valid, consistent decimal literals.

Written by the indexing model from the issue text.

Description

Several GPU code paths format float constants with std::to_string(), which follows the C runtime locale (LC_NUMERIC). All other float formatting in OCIO follows the C++ global locale, for example via std::ostringstream. These are independent settings, so on comma-decimal systems (e.g. fr_FR, sv_SE) the two mechanisms can produce different decimal separators in the same shader. The affected call sites emit literals such as 100 000000 instead of 100.0, while neighboring constants from getFloatString() remain correct. The resulting GLSL/HLSL fails to compile or produces incorrect output.

This is most visible with ACES 2.x fixed-function GPU paths (gamut compress / tone scale), but the same pattern exists in grading-tone GPU code.

Affected call sites (12 float std::to_string calls across 7 lines, 2 files):

ops/fixedfunction/FixedFunctionOpGPU.cpp

  • _Add_Focus_Gain_func (line 947)
  • _Add_Compress_Gamut_func (line 1187)
  • _Add_Gamut_Compress_Inv_Shader (line 1269)

ops/gradingtone/GradingToneOpGPU.cpp

  • Add_MidsPre_Shader (line 304)
  • Add_SContrastTopPre_Shader (lines 1249, 1260)
  • Add_SContrastBottomPre_Shader (line 1300)

Suggested fix: Replace std::to_string(float) with getFloatString(), or route through the existing FloatToString() helpers in ParseUtils.cpp.

Dominant language
C++
Stars
2.1k
Forks
503
Avg merge
8d 3h
Merged PRs (30d)
10

Getting set up

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.

More from AcademySoftwareFoundation/OpenColorIO

All issues in AcademySoftwareFoundation/OpenColorIO

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.