Repository navigation
Conversation
char is signed on x86-64 and Apple arm64 but unsigned on Linux aarch64, and TileDB keeps signed values in chars. The array schema stores each compression level as a char, so on aarch64 zlib's default level of -1 read back as 255 and GZIP compression failed with Z_STREAM_ERROR. TILEDB_EMPTY_CHAR (CHAR_MAX), which marks missing char values on disk, was 255 there and 127 elsewhere: missing values written on x86-64 or macOS read back on aarch64 as 127, and missing values written on aarch64 read back elsewhere as -1. TileDB is now built with -fsigned-char, which its library targets also pass on to code that links them, since that code reads TILEDB_EMPTY_CHAR from TileDB's headers.
This was referenced Oct 5, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
charis signed on x86-64 and Apple arm64 but unsigned on Linux aarch64, and TileDB keeps signed values inchars. The array schema stores each compression level as achar, so on Linux aarch64 zlib's default level of −1 reads back as 255 and GZIP compression fails withZ_STREAM_ERROR, as intiledb_array_write_dense_1.TILEDB_EMPTY_CHAR(CHAR_MAX), which marks missing char values on disk, is 255 there and 127 everywhere else, so missing values written on x86-64 or macOS read back on aarch64 as 127, and missing values written on aarch64 read back elsewhere as −1. This builds TileDB with-fsigned-charand adds it to the link interface oftiledb_staticandtiledb_shared, so that code linking them, such as GenomicsDB, agrees onTILEDB_EMPTY_CHARtoo, and adds a test that it is 127. CI has no aarch64 runner, so I checked it in an AlmaLinux 8 container on aarch64 with GCC 15 and clang 21, which need #12 to build: every test and example passes with this change, andtiledb_array_write_dense_1fails without it.@nalinigans, one thing needs your view: arrays already written on Linux aarch64 mark missing chars with 255, which after this change reads as −1 rather than as missing. If there are aarch64 users with existing workspaces, it would need at least a note in the release.