diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-12 10:17:07 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-19 15:10:37 +0100 |
commit | 14efbfd96d67800e55137f89ec7a09d81049d176 (patch) | |
tree | ac65bf4811d743d478ae348b3dc5d09a700b7f9b | |
parent | Merge pull request #21444 from poettering/gpt-test (diff) | |
download | systemd-14efbfd96d67800e55137f89ec7a09d81049d176.tar.xz systemd-14efbfd96d67800e55137f89ec7a09d81049d176.zip |
docs: clarify the assumption on numeric values of JSON parsers we make
Prompted by:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/BOBD6KVTXPR6K5ANAX6LIJLKNSGXCR3B/
-rw-r--r-- | docs/COREDUMP_PACKAGE_METADATA.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/COREDUMP_PACKAGE_METADATA.md b/docs/COREDUMP_PACKAGE_METADATA.md index e34abbd147..705d5d695a 100644 --- a/docs/COREDUMP_PACKAGE_METADATA.md +++ b/docs/COREDUMP_PACKAGE_METADATA.md @@ -67,6 +67,16 @@ Value: a JSON string with the structure described below } ``` +When it comes to JSON numbers, this specification assumes that JSON parsers +processing this information are capable of reproducing the full signed 53bit +integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64bit IEEE floating +point number range losslessly (with the exception of NaN/-inf/+inf, since JSON +cannot encode that), as per recommendations of +[RFC8259](https://datatracker.ietf.org/doc/html/rfc8259#page-8). Fields in +these JSON objects are thus permitted to encode numeric values from these +ranges as JSON numbers, and should not use numeric values not covered by these +types and ranges. + A reference implementations of a [build-time tool is provided](https://github.com/systemd/package-notes) and can be used to generate a linker script, which can then be used at build time via ```LDFLAGS="-Wl,-T,/path/to/generated/script"``` to include the note in the binary. |