1
0
mirror of https://git.tukaani.org/xz.git synced 2025-02-17 14:08:12 +00:00

1962 Commits

Author SHA1 Message Date
Lasse Collin
2d14bf53b9 Tests: test_index: Fix failures when features are disabled
Fixes: cd88423e76d54eb72aea037364f3ebb21f122503
(cherry picked from commit 710a4573ef2cbd19c66318c3b2d1388e418e26c7)
2024-05-22 00:12:07 +03:00
Lasse Collin
8ace8b9c97 Tests: test_index: Edit a misleading test
(cherry picked from commit d879686469c9c4bf2a7c0bb6420ebe4530fc8f07)
2024-05-22 00:12:07 +03:00
Lasse Collin
7e8142ff56 Tests: test_index: Use minimal values to test integer overflow
(cherry picked from commit 612005bbdb0dea9dc09e9e2e9cc16a15c1480acd)
2024-05-22 00:12:07 +03:00
Lasse Collin
4ae9e708bc Tests: test_index: Test lzma_index_buffer_decode() more
(cherry picked from commit 4ad88b2544c2aaf8de8f38af54587098cbe66c1d)
2024-05-22 00:12:07 +03:00
Lasse Collin
61be041f84 Tests: test_index: Test that *i = NULL is done on LZMA_PROG_ERROR
On LZMA_DATA_ERROR from lzma_index_buffer_decode(), *i = NULL was
already done but this adds a test for that case too.

(cherry picked from commit 575b11b0d291e66c5fce31ce7a72f11436d57c83)
2024-05-22 00:12:07 +03:00
Lasse Collin
f39a7ba7f9 Tests: test_index: Test lzma_index_buffer_encode() with empty output buf
(cherry picked from commit 2c970debdb285823f01f75e875561d893345ac2b)
2024-05-22 00:12:07 +03:00
Lasse Collin
780ddb8173 Tests: test_index: Replace if-statements with tuktest assertions
(cherry picked from commit cd88423e76d54eb72aea037364f3ebb21f122503)
2024-05-22 00:12:07 +03:00
Lasse Collin
24dd20ca1d Tests: test_index: Make it clear that my_alloc() has no integer overflows
liblzma guarantees that the product of the allocation size arguments
will fit in size_t.

Putting the pre-increment in the if-statement was clearly wrong
although in practice it didn't matter here as the function is
called only a couple of times.

(cherry picked from commit 7f865577a6224fbbb5f5ca52574b62ea8ac9bf51)
2024-05-22 00:12:07 +03:00
Lasse Collin
189251f5d2 Tests: test_index: Verify also iter.block.number_in_stream
(cherry picked from commit 12313a3b6596cdcf012e180597f84d231f8730d3)
2024-05-22 00:12:07 +03:00
Lasse Collin
e82a20c5c1 Tests: test_index: Check cases that aren't a multiple of 4 bytes
(cherry picked from commit ad2654010d9d641ce1601beeff00630027e6bcd4)
2024-05-22 00:12:07 +03:00
Lasse Collin
214569ace8 liblzma: index_decoder: Fix missing initializations on LZMA_PROG_ERROR
If the arguments to lzma_index_decoder() or lzma_index_buffer_decode()
were such that LZMA_PROG_ERROR was returned, the lzma_index **i
argument wasn't touched even though the API docs say that *i = NULL
is done if an error occurs. This obviously won't be done even now
if i == NULL but otherwise it is best to do it due to the wording
in the API docs.

In practice this matters very little: The problem can occur only
if the functions are called with invalid arguments, that is,
the calling application must already have a bug.

(cherry picked from commit 71eed2520e2eecae89bade9dceea16e56cfa2ea0)
2024-05-22 00:12:07 +03:00
Lasse Collin
80f72396ea CMake: Bump maximum policy version to 3.29 2024-05-22 00:12:07 +03:00
Lasse Collin
cf3780e309 liblzma: API doc cleanups
(cherry picked from commit 08ab0966a75b501aa7c717622223f0c13a113c75)
2024-05-22 00:12:07 +03:00
Lasse Collin
d15eb46891 Tests: test_filter_str: Add a few assertions
(cherry picked from commit 3ac8a9bb4cccbee88350696dc9c645c48d77c989)
2024-05-22 00:12:07 +03:00
Lasse Collin
1c0dfaee63 Tests: test_filter_str: Move one assertion and add a comment
(cherry picked from commit 26c69be80523b05c84dea86c47c4ddd9a10945d7)
2024-05-22 00:12:07 +03:00
Lasse Collin
ef35365984 Tests: test_filter_str: Tweak comments and white space
(cherry picked from commit 4f6af853bc99904efb8b6c28a0af7b81a8476c1b)
2024-05-22 00:12:07 +03:00
Lasse Collin
c35e10fb37 Tests: test_filter_str: Test *error_pos more thoroughly
(cherry picked from commit b0366df1d7ed26268101f9303a001c91c0806dfc)
2024-05-22 00:12:07 +03:00
Lasse Collin
6364cbc63e liblzma: lzma_str_to_filters: Set *error_pos on all errors
The API docs clearly say that if error_pos isn't NULL then *error
is always set on any error. However, it wasn't touched if str == NULL
or filters == NULL or unsupported flags were specified.

Fixes: cedeeca2ea6ada5b0411b2ae10d7a859e837f203
(cherry picked from commit 70d12dd069bb9bb0d6bb1c8fafc4e6f77780263d)
2024-05-22 00:12:07 +03:00
Lasse Collin
6edc2b554f xz man page: Use .ft CR instead of CW to silence warnings from groff.
(cherry picked from commit 31ef676567c9d6fcc4ec9fc833c312f7a7c21c48)
2024-05-22 00:12:07 +03:00
Lasse Collin
077b673a8d Docs: Update .xz file format specification to 1.2.1.
This only reverts the XZ URL changes.

(cherry picked from commit 8dd03d4484ccf80022722a16d0ed9b37f2b58072)
2024-05-22 00:12:07 +03:00
Lasse Collin
c5c091332c Update website URLs back to tukaani.org.
The XZ projects were moved back to their original URLs.

(cherry picked from commit 17aa2e1a796d3f758802df29afc89dcf335db567)
2024-05-22 00:12:07 +03:00
Lasse Collin
995afe4646 Update THANKS.
(cherry picked from commit db4dd74a344580e0b81436598d9741a3454245b0)
2024-05-22 00:12:07 +03:00
Lasse Collin
44a5c1374e INSTALL: Document arguments of --enable-symbol-versions.
(cherry picked from commit 8a25ba024d55610c448c6e4f1400a00bae51b493)
2024-05-22 00:12:07 +03:00
Lasse Collin
b03139b1d2 Build: Use only the generic symbol versioning with NVIDIA HPC Compiler.
This does the previous commit with CMake.

AC_EGREP_CPP uses AC_REQUIRE so the outermost if-commands must
be changed to AS_IF to ensure that things wont break some day.
See 5a5bd7f871818029d5ccbe189f087f591258c294.

(cherry picked from commit 49324b711f9d42b3543bf2f3ae598eaa03360bd5)
2024-05-22 00:12:07 +03:00
Lasse Collin
08754772e8 CMake: Use only the generic symbol versioning with NVIDIA HPC Compiler.
It doesn't support the __symver__ attribute or __asm__(".symver ...").
The generic symbol versioning can still be used since it only needs
linker support.

(cherry picked from commit c273123ed0ebaebf49994057a7fe98aae7f42c40)
2024-05-22 00:12:07 +03:00
Lasse Collin
9579efdbfd Update THANKS.
(cherry picked from commit df7f487648d18a3992386a59b8a061edca862d17)
2024-05-22 00:12:07 +03:00
Lasse Collin
32e256c12a liblzma: Minor comment edits.
(cherry picked from commit 3217b82b3ec023bf8338249134a076bea0ea30ec)
2024-05-22 00:12:07 +03:00
Sergey Kosukhin
65ac20807c liblzma: Fix building with NVHPC (NVIDIA HPC SDK).
NVHPC compiler has several issues that make it impossible to
build liblzma:
  - the compiler cannot handle unions that contain pointers that
    are not the first members;
  - the compiler fails to produce valid code for delta_decode if the
    vectorization is enabled, which results in failed tests.

This introduces NVHPC-specific workarounds that address the issues.

(This commit was contributed under 0BSD but the author confirmed
that it is fine to backport it to the public domain branches. See
https://github.com/tukaani-project/xz/pull/90#issuecomment-2100185936
and the next two messages.)

(cherry picked from commit 096bc0e3f8fb4bfc4d2f3f64a7f219401ffb4c31)
2024-05-22 00:11:58 +03:00
Lasse Collin
78a015e753 CMake: Disable symbol versioning on non-glibc Linux.
This better matches what configure.ac does. For example, musl has
only basic symbol versioning support:

https://wiki.musl-libc.org/functional-differences-from-glibc.html#Symbol_versioning

configure.ac tries to enable symbol versioning only with glibc
so now CMake does the same.

(cherry picked from commit 2ad7fad67080e88fa7fc191f9d613d8b7add9c62)
2024-05-22 00:11:58 +03:00
Lasse Collin
20e590bbed CMake: Make symbol versioning configurable.
(cherry picked from commit 82f0c0d39eb2c026b1d96ee706f70ace868d4ed4)
2024-05-22 00:11:58 +03:00
Lasse Collin
bcac3e3aa2 CMake: Handle symbol versioning on MicroBlaze specially.
This is to match configure.ac.

(cherry picked from commit 025eb6d7879e4c4e8cb29716b371e0f4c1aea660)
2024-05-22 00:11:58 +03:00
Lasse Collin
9e7daa8dbd Build: Style tweaks to configure.ac.
The AC_MSG_ERROR line is overlong anyway as are a few other
AC_MSG_ERROR lines already.

(cherry picked from commit 45d33bfc45e4295b8ad743bc2ae61cc724f98076)
2024-05-22 00:11:58 +03:00
Sergey Kosukhin
ce3a9fa94d Build: Let the users override the symbol versioning variant.
There are cases when the users want to decide themselves whether
they want to have the generic (even on GNU/Linux) or the linux
(even if we do not recommend that) symbol versioning variant.
The former might be needed to circumvent compiler issues (i.e.
the compiler does not support all features that are required
for the linux versioning), the latter might help in overriding
the assumptions made in the configure script.

(This commit was contributed under 0BSD but the author confirmed
that it is fine to backport it to the public domain branches. See
https://github.com/tukaani-project/xz/pull/90#issuecomment-2100185936
and the next two messages.)

(cherry picked from commit f56ed6fac6619b56b005878d3b5210e2f0d721c0)
2024-05-22 00:11:45 +03:00
Lasse Collin
a8b3fb6d2f INSTALL: Clarify that --disable-assembler affects only 32-bit x86.
(cherry picked from commit 00440f52be9ac2c7438c7b0cb1082f12399632c6)
2024-05-22 00:07:08 +03:00
Lasse Collin
b4b315a206 xz: Delete old commented-out code.
(cherry picked from commit 4ce300ce0884c6e552de2af9ae8050b47b01f0e7)
2024-05-22 00:07:08 +03:00
Lasse Collin
9c9a3e7b3f xz: Tweak comments.
(cherry picked from commit 7312dfbb02197c7f990c7a3cefd027a9387d1473)
2024-05-22 00:07:08 +03:00
Lasse Collin
7d3418e496 xz: Fix message_init() description.
Also explicitly initialize progress_automatic to make it clear
that it can be read before message_init() sets it. Static variable
was initialized to false by default already so this is only for
clarity.

(cherry picked from commit c701a5909ad9882469fbab4fab5d2d5556d3ba78)
2024-05-22 00:07:08 +03:00
Lasse Collin
fb6cf07ac7 Build: Don't install TODO.
(cherry picked from commit f3440e78c9517db75bfa52e1a378fad60b073bbe)
2024-05-22 00:07:08 +03:00
Jia Tan
e164211b09 Update m4/.gitignore.
(cherry picked from commit 4323bc3e0c1e1d2037d5e670a3bf6633e8a3031e)
2024-05-22 00:07:08 +03:00
Lasse Collin
46b6459c9e Tests: tuktest.h: Add a missing word to a comment.
(cherry picked from commit cce7330b9f23485a0879422e0c3395a7065439ac)
2024-05-07 18:31:08 +03:00
Lasse Collin
e46fcd1ed7 Tests: tuktest.h: Fix the comment about STest.
(cherry picked from commit 5dd8fc9452a3373cedc27379067ce638f992c741)
2024-05-07 18:31:08 +03:00
Lasse Collin
f892ac150a Docs: Include doc/examples/11_file_info.c in tarballs.
It was added in 2017 in c2e29f06a7d1e3ba242ac2fafc69f5d6e92f62cd
but it never got into any release tarballs because it was
forgotten to be added to Makefile.am.

(cherry picked from commit dfdb60ffe933a1f1497d300dbb4513ed17ec6f0e)
2024-05-07 18:27:50 +03:00
Lasse Collin
62cfb46acc xz: Fix outdated threading related info on the man page.
(cherry picked from commit 0709c2b2d7c1d8f437b003f691880fd7810e5be5)
2024-05-07 18:27:15 +03:00
Lasse Collin
65b5ee0716 liblzma: Fix compilation of price_tablegen.c.
It is built and run only manually so this didn't matter
unless one wanted to regenerate the price_table.c.

(cherry picked from commit 8e4ec794836bc1701d8c9bd5e347b8ce8cc5bbb4)
2024-05-07 18:13:03 +03:00
Lasse Collin
f200c338f8 liblzma: Sync the AUTHORS fix about SHA-256 to lzma.h.
(based on commit 23de53421ea258cde6a3c33a038b1e9d08f771d1)
2024-05-07 18:11:43 +03:00
Lasse Collin
402fb45c74 Fix SHA-256 authors.
The initial commit 5d018dc03549c1ee4958364712fb0c94e1bf2741
in 2007 had a comment in sha256.c that the code is based on
Crypto++ Library 5.5.1. In 2009 the Authors list in sha256.c
and the AUTHORS file was updated with information that the
code had come from Crypto++ but via 7-Zip. I know I had viewed
7-Zip's SHA-256 code but back then the C code has been identical
enough with Crypto++, so I don't why I thought the author info
would need that extra step via 7-Zip for this single file.

Another error is that I had mixed sha.* and shacal2.* files
when checking for author info in Crypto++. The shacal2.* files
aren't related to liblzma's sha256.c and thus Kevin Springle's
code in Crypto++ isn't either.

(cherry picked from commit 76946dc4336c831fe2cc26696a035d807dd3cf13)
2024-05-07 18:07:31 +03:00
Lasse Collin
e5ba545f16 xzless: Use ||- in LESSOPEN with with "less" 451 and newer.
(cherry picked from commit 9860d418d296eb3c721e5384fb367c0499b579c8)
2024-05-07 18:06:55 +03:00
Lasse Collin
5e7a8c0869 xzless: Use --show-preproc-errors with "less" 632 and newer.
This makes "less" show a warning if a decompression error occurred.

(cherry picked from commit fd0692b0525e6c26b496492be9e2c865cab734f8)
2024-05-07 18:06:55 +03:00
Lasse Collin
c692bd42be Build: Update visibility.m4 from Gnulib
This fixes the syntax of the "serial" line and renames
a temporary variable.
2024-05-07 16:23:46 +03:00
Jia Tan
6e8732c5a3 Bump version and soname for 5.4.6. v5.4.6 2024-01-26 19:41:20 +08:00