aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2024-03-24 10:10:32 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2024-03-24 10:21:47 +0300
commitdc2c1c80986f753c62642f0c6a5edff69b7fc8b9 (patch)
tree334bda8d330aea8f9977e28643abaf7c6ed16c63
parent1c202523203ef21da9a3060e70379cf5b20685d4 (diff)
downloadydb-dc2c1c80986f753c62642f0c6a5edff69b7fc8b9.tar.gz
Update contrib/libs/lzma to 5.6.1
0a981b204173e2ede75381ec3e0bcc40c2770a74
-rw-r--r--contrib/libs/lzma/NEWS28
-rw-r--r--contrib/libs/lzma/liblzma/api/lzma/version.h2
-rw-r--r--contrib/libs/lzma/liblzma/check/crc32_fast.c2
-rw-r--r--contrib/libs/lzma/liblzma/check/crc64_fast.c1
-rw-r--r--contrib/libs/lzma/liblzma/check/crc_common.h25
-rw-r--r--contrib/libs/lzma/liblzma/simple/riscv.c6
-rw-r--r--contrib/libs/lzma/ya.make4
7 files changed, 61 insertions, 7 deletions
diff --git a/contrib/libs/lzma/NEWS b/contrib/libs/lzma/NEWS
index 65a8724d6a..e6a965adb9 100644
--- a/contrib/libs/lzma/NEWS
+++ b/contrib/libs/lzma/NEWS
@@ -2,6 +2,32 @@
XZ Utils Release Notes
======================
+5.6.1 (2024-03-09)
+
+ * liblzma: Fixed two bugs relating to GNU indirect function (IFUNC)
+ with GCC. The more serious bug caused a program linked with
+ liblzma to crash on start up if the flag -fprofile-generate was
+ used to build liblzma. The second bug caused liblzma to falsely
+ report an invalid write to Valgrind when loading liblzma.
+
+ * xz: Changed the messages for thread reduction due to memory
+ constraints to only appear under the highest verbosity level.
+
+ * Build:
+
+ - Fixed a build issue when the header file <linux/landlock.h>
+ was present on the system but the Landlock system calls were
+ not defined in <sys/syscall.h>.
+
+ - The CMake build now warns and disables NLS if both gettext
+ tools and pre-created .gmo files are missing. Previously,
+ this caused the CMake build to fail.
+
+ * Minor improvements to man pages.
+
+ * Minor improvements to tests.
+
+
5.6.0 (2024-02-24)
This bumps the minor version of liblzma because new features were
@@ -23,7 +49,7 @@ XZ Utils Release Notes
* Sandboxing support in xz:
- Landlock is now used even when xz needs to create files.
- In this case the sandbox is has to be more permissive than
+ In this case the sandbox has to be more permissive than
when no files need to be created. A similar thing was
already in use with pledge(2) since 5.3.4alpha.
diff --git a/contrib/libs/lzma/liblzma/api/lzma/version.h b/contrib/libs/lzma/liblzma/api/lzma/version.h
index c13a82d5f3..be4191a723 100644
--- a/contrib/libs/lzma/liblzma/api/lzma/version.h
+++ b/contrib/libs/lzma/liblzma/api/lzma/version.h
@@ -22,7 +22,7 @@
#define LZMA_VERSION_MINOR 6
/** \brief Patch version number of the liblzma release. */
-#define LZMA_VERSION_PATCH 0
+#define LZMA_VERSION_PATCH 1
/**
* \brief Version stability marker
diff --git a/contrib/libs/lzma/liblzma/check/crc32_fast.c b/contrib/libs/lzma/liblzma/check/crc32_fast.c
index 3efe17e1c9..6c79a2dbb7 100644
--- a/contrib/libs/lzma/liblzma/check/crc32_fast.c
+++ b/contrib/libs/lzma/liblzma/check/crc32_fast.c
@@ -135,6 +135,8 @@ typedef uint32_t (*crc32_func_type)(
// This resolver is shared between all three dispatch methods. It serves as
// the ifunc resolver if ifunc is supported, otherwise it is called as a
// regular function by the constructor or first call resolution methods.
+// The function attributes are needed for safe IFUNC resolver usage with GCC.
+lzma_resolver_attributes
static crc32_func_type
crc32_resolve(void)
{
diff --git a/contrib/libs/lzma/liblzma/check/crc64_fast.c b/contrib/libs/lzma/liblzma/check/crc64_fast.c
index f29fe3d3c5..52cddb2c54 100644
--- a/contrib/libs/lzma/liblzma/check/crc64_fast.c
+++ b/contrib/libs/lzma/liblzma/check/crc64_fast.c
@@ -98,6 +98,7 @@ typedef uint64_t (*crc64_func_type)(
# pragma GCC diagnostic ignored "-Wunused-function"
#endif
+lzma_resolver_attributes
static crc64_func_type
crc64_resolve(void)
{
diff --git a/contrib/libs/lzma/liblzma/check/crc_common.h b/contrib/libs/lzma/liblzma/check/crc_common.h
index 856665db79..5a86556f7a 100644
--- a/contrib/libs/lzma/liblzma/check/crc_common.h
+++ b/contrib/libs/lzma/liblzma/check/crc_common.h
@@ -128,6 +128,31 @@
# endif
#endif
+#ifdef CRC_USE_IFUNC
+// Two function attributes are needed to make IFUNC safe with GCC.
+//
+// no-omit-frame-pointer prevents false Valgrind issues when combined with
+// a few other compiler flags. The optimize attribute is supported on
+// GCC >= 4.4 and is not supported with Clang.
+# if TUKLIB_GNUC_REQ(4,4) && !defined(__clang__)
+# define no_omit_frame_pointer \
+ __attribute__((optimize("no-omit-frame-pointer")))
+# else
+# define no_omit_frame_pointer
+# endif
+
+// The __no_profile_instrument_function__ attribute support is checked when
+// determining if ifunc can be used, so it is safe to use unconditionally.
+// This attribute is needed because GCC can add profiling to the IFUNC
+// resolver, which calls functions that have not yet been relocated leading
+// to a crash on liblzma start up.
+# define lzma_resolver_attributes \
+ __attribute__((__no_profile_instrument_function__)) \
+ no_omit_frame_pointer
+#else
+# define lzma_resolver_attributes
+#endif
+
// For CRC32 use the generic slice-by-eight implementation if no optimized
// version is available.
#if !defined(CRC32_ARCH_OPTIMIZED) && !defined(CRC32_GENERIC)
diff --git a/contrib/libs/lzma/liblzma/simple/riscv.c b/contrib/libs/lzma/liblzma/simple/riscv.c
index aabbb05205..b18df8b637 100644
--- a/contrib/libs/lzma/liblzma/simple/riscv.c
+++ b/contrib/libs/lzma/liblzma/simple/riscv.c
@@ -116,7 +116,7 @@ AUIPC with rd != x0
Zfh, F, D, and Q:
* RV32I: LB, LH, LW, LBU, LHU, SB, SH, SW
* RV64I has also: LD, LWU, SD
- * Zhf: FLH, FSH
+ * Zfh: FLH, FSH
* F: FLW, FSW
* D: FLD, FSD
* Q: FLQ, FSQ
@@ -320,11 +320,11 @@ AUIPC with rd == x0
// The left-hand side takes care of (1) and (2).
// (a) The lowest 7 bits are already known to be AUIPC so subtracting 0x17
// makes those bits zeros.
-// (b) If AUIPC rd equals x2, subtracting 0x10 makes bits [11:7] zeros.
+// (b) If AUIPC rd equals x2, subtracting 0x100 makes bits [11:7] zeros.
// If rd doesn't equal x2, then there will be at least one non-zero bit
// and the next step (c) is irrelevant.
// (c) If the lowest two opcode bits of the packed inst2 are set in [13:12],
-// then subtracting 0x300 will make those bits zeros. Otherwise there
+// then subtracting 0x3000 will make those bits zeros. Otherwise there
// will be at least one non-zero bit.
//
// The shift by 18 removes the high bits from the final '>=' comparison and
diff --git a/contrib/libs/lzma/ya.make b/contrib/libs/lzma/ya.make
index 0f9b73d66a..e7a79f0b30 100644
--- a/contrib/libs/lzma/ya.make
+++ b/contrib/libs/lzma/ya.make
@@ -11,9 +11,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(5.6.0)
+VERSION(5.6.1)
-ORIGINAL_SOURCE(https://github.com/tukaani-project/xz/archive/v5.6.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/tukaani-project/xz/archive/v5.6.1.tar.gz)
ADDINCL(
GLOBAL contrib/libs/lzma/liblzma/api