Skip to content

OpenXISF 1.0.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 02:54
· 16 commits to main since this release
5d98e9f

OpenXISF 1.0.0 is the first stable release: the API is stable, and from now on only a new major version may break it.
The ABI holds within a minor version: the shared library is libopenxisf.so.1.0, and each minor version gets a soname
of its own.

Signed units. A unit whose header carries an XML signature after its root element is read like any other. The
reader returns the signature and the root element that it covers, byte for byte, for the XML signature tooling of the
application; it does not verify signatures. A malformed signature, or one that does not name the root element, and a
block of a signed unit without a checksum, are warnings. The writer never signs: a signed unit written again is
unsigned.

Security. On Windows, the default resolver of a distributed unit reads each file through the handle whose final
path it checked: a directory whose name ends with a dot, reached through a junction, could lead it to a file outside
the directory of the header file, since Windows drops that dot when it opens a path again. The relative directory of a
file_resolver() and the target of a file_sink are made absolute when they are made, so a later change of the current
directory does not change what they open. Headers that hold tens of thousands of namespace declarations, tables or
element names no longer take quadratic time. The copies that Reference elements make count against
limits::max_ancillary_data with the size of each object, and a block that fails to load no longer holds room there.
With oneTBB, a Zstandard frame without a declared size is decoded alone, so limits::max_zstd_window bounds a read
rather than each thread. The limits on the number and nesting of XML elements are checked on the text before the
document is built, so a header beyond them costs no memory, and limits.h says how the size of a header bounds the
memory of its attributes. Every fuzz target had a long campaign with MSVC's libFuzzer and AddressSanitizer besides the
hour per target of the nightly runs with Clang, ASan and UBSan; the sanitizer matrix, clang-tidy, CodeQL and MSVC's
static analysis are clean. The build supports the fuzzing engines of OSS-Fuzz (OPENXISF_FUZZING_ENGINE,
fuzz/oss-fuzz/build.sh).

Reading. Departures from the specification that are harmless are read with a warning: codec and checksum algorithm
names in another case, characters that XML 1.0 does not allow, character data outside the root element, blank FITS
keywords and keyword values or comments outside printable ASCII, and ICC profiles without the header of a profile. A
reference to U+0000 is refused everywhere in the header, in attribute values and the XML declaration included.
XISF:CreationTime and the other reserved TimePoint properties that PixInsight writes as Strings are read as the
TimePoint they hold, with an info diagnostic instead of a warning, so the files of PixInsight open without warnings. A
header-only open keeps the identifiers of the values that it leaves in their blocks, and the io_error or
unsupported_error of a resolver keeps its class and its system error. A typed read into memory of the application no
longer applies limits::max_allocation, as a read of bytes did not.

Writing. save() refuses a sink that already holds bytes. A String longer than 1 MiB is written in a data block, so
that the header stays within the limits of readers. The writer refuses an RGB working space whose chromaticities give
luminance coefficients outside [0, 1], a table field whose type is no property type, and U+FFFE or U+FFFF in the path
of a data blocks file. A unit whose header would be too long is refused before any byte of it is written, the data
blocks file of a distributed unit included. Float128 and Complex128 values are kept without the white space around
them and their parts.

Algorithms. White converts to CIE L*a*b* with a lightness of exactly 1, and sRGB white delinearizes to exactly 1.
Primaries that lie on one line within rounding define no RGB working space on every platform, fused multiply-adds
included. The pixel algorithms refuse bounds whose width overflows a double. The inverse Gnomonic projection applies the
limit of 89.999 degrees of the direct one, a CR LF ends a line of the Terms of a distortion model, and the PlateCarree
and Mercator projections take points more than 180 degrees from their reference point modulo 360, as PixInsight does.

API. The constructors of property_value from scalars, strings and vectors are noexcept, and
from_float128_text() and from_complex128_text() take a std::string_view; the accessors of the built-in sources
and sinks are [[nodiscard]]; property_type_name() gives an empty name for a value outside the enumeration; the
members of diagnostic have default values. On Windows, stdio_source and stdio_sink no longer take a FILE* on a
pipe for one that can seek, and stream_io.h says that the C++ stream adapters cannot tell.

Build and packaging. The library of a Debug build is named openxisfd, so Debug and Release builds install side by
side in one prefix; the pkg-config file names the library of the configuration installed, and writes an absolute
install directory as it is. A static package finds LZ4 and Zstandard in openxisf-dependencies.cmake, which leaves the
module path of the consumer as it was when one is missing. The hardening flags use _FORTIFY_SOURCE=2 with GCC before
12, and only in the optimized configurations.

Platforms. CI builds and tests the oldest compilers supported: the MSVC of Visual Studio 2022, GCC 11 and Clang 15
with libstdc++, with the packages of Ubuntu 22.04, Clang 18 with libc++, and the AppleClang of the first Xcode 16, which
replaces Xcode 15; 0.5.0 named Clang 15 with libc++, which is not tested. CI also builds through the pkg-config file and
from the sources through FetchContent, runs ThreadSanitizer with oneTBB, builds the fuzz targets with a fuzzing engine
as OSS-Fuzz does, and builds without the SIMD kernels and as shared libraries on MinGW and macOS.

Conformance. The README lists every requirement of the specification with the tests that cover it, and the
abilities of a baseline decoder (spec §7.2) have tests of their own. The full sample set of PixInsight is read, and
units written with every option open in PixInsight 1.9.5 with the values written. The round-trip tests are byte-order
independent, which the s390x nightly job had shown they were not.