Skip to content

ub in jsonFromEnvMap() at IccCmmConfig.cpp:933 #1399

Description

@xsscx

XNU Task

2026-06-17 01:35:37 UTC

TODO @xsscx

Fixup for ordered/unordered map to Silence the runtime errors seen below.

XNU Host

Darwin Kernel Version 25.5.0: Mon Apr 27 20:38:00 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T8103 arm64

XNU Log

iccApplyProfiles -exportcfg foo.bar Data/smCows380_5_780.tif foo.tif 2 1 0 1 1 -embedded 3 ICC/MultSpectralRGB.icc 65535
...
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:141:40: runtime error: left shift of 7308332046385373561 by 52 places cannot be represented in type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:141:40
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:169:41: runtime error: left shift of 1180918633 by 3 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:169:41
IccLibConnect/IccCmmConfig.cpp:933:39: runtime error: load of value 53, which is not a valid value for type 'icXformLutType'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior IccLibConnect/IccCmmConfig.cpp:933:39
...
zsh: abort      iccApplyProfiles -exportcfg foo.bar Data/smCows380_5_780.tif foo.tif 2 1 0 1

Pix

Image

Originally posted by @xsscx in #1375

Metadata

Metadata

Assignees

Labels

JSONICC JSON parser, config, or round-trip behaviorQAMaintainer indicates topic of Quality AssuranceTriagedMaintainer indicates triaged status and ready for developer handoff

Type

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions