From d091f50e88f618fdf4d7d287b147fdbc6fd720db Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 17 Jul 2026 10:51:57 +0000 Subject: [PATCH 1/2] chore(deps): update dependency lz4 to v1.10.0 --- pp/third_party/deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pp/third_party/deps.bzl b/pp/third_party/deps.bzl index 37adb3725..72e8d5fc7 100644 --- a/pp/third_party/deps.bzl +++ b/pp/third_party/deps.bzl @@ -98,9 +98,9 @@ def _third_party_deps_impl(_ctx): Label("//third_party/patches/lz4:0003-fix_offsetof_calculation.patch"), Label("//third_party/patches/lz4:0004-svacer_fixes.patch"), ], - sha256 = "658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc", - strip_prefix = "lz4-1.9.2", - url = "https://github.com/lz4/lz4/archive/v1.9.2.tar.gz", + sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", + strip_prefix = "lz4-1.10.0", + url = "https://github.com/lz4/lz4/archive/v1.10.0.tar.gz", ) http_archive( From c37b4b820817d5c70935d4d9f665d09daf75c19b Mon Sep 17 00:00:00 2001 From: Bastrykov Evgeniy Date: Thu, 23 Jul 2026 00:05:28 +0400 Subject: [PATCH 2/2] fix(deps): rebase lz4 patches onto v1.10.0 The lz4 1.9.2 -> 1.10.0 bump left the local patches unaligned with the new upstream sources, so patches 0001-0003 no longer applied. Rebase them against the 1.10.0 layout: - 0001: visibility is now controlled via the LZ4FLIB_VISIBILITY macro - 0002: relocate the LZ4F_allocated_memory hunks to the new context - 0003: offsetof rewrite adapts to the LZ4_ALIGN_TEST-guarded typedef Verified all four patches apply with `patch -p0` on a fresh v1.10.0 tree and that the patched sources compile warning-clean. Co-authored-by: Cursor --- .../0001-remove_visibility_attribute.patch | 18 +++++++++--------- .../lz4/0002-add_allocated_memory.patch | 19 +++++++++---------- .../lz4/0003-fix_offsetof_calculation.patch | 12 ++++++------ 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/pp/third_party/patches/lz4/0001-remove_visibility_attribute.patch b/pp/third_party/patches/lz4/0001-remove_visibility_attribute.patch index 48bf9fa66..306a78b70 100644 --- a/pp/third_party/patches/lz4/0001-remove_visibility_attribute.patch +++ b/pp/third_party/patches/lz4/0001-remove_visibility_attribute.patch @@ -1,11 +1,11 @@ --- lib/lz4frame.h +++ lib/lz4frame_patched.h -@@ -74,7 +74,7 @@ extern "C" { - #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) - # define LZ4FLIB_API __declspec(dllimport) - #elif defined(__GNUC__) && (__GNUC__ >= 4) --# define LZ4FLIB_API __attribute__ ((__visibility__ ("default"))) -+# define LZ4FLIB_API - #else - # define LZ4FLIB_API - #endif +@@ -71,7 +71,7 @@ extern "C" { + */ + #ifndef LZ4FLIB_VISIBILITY + # if defined(__GNUC__) && (__GNUC__ >= 4) +-# define LZ4FLIB_VISIBILITY __attribute__ ((visibility ("default"))) ++# define LZ4FLIB_VISIBILITY + # else + # define LZ4FLIB_VISIBILITY + # endif diff --git a/pp/third_party/patches/lz4/0002-add_allocated_memory.patch b/pp/third_party/patches/lz4/0002-add_allocated_memory.patch index ce85bdcaf..2423f9058 100644 --- a/pp/third_party/patches/lz4/0002-add_allocated_memory.patch +++ b/pp/third_party/patches/lz4/0002-add_allocated_memory.patch @@ -1,26 +1,25 @@ --- lib/lz4frame.h +++ lib/lz4frame.h -@@ -467,7 +467,7 @@ LZ4FLIB_API size_t LZ4F_decompress(LZ4F_dctx* dctx, +@@ -512,6 +512,7 @@ LZ4FLIB_API size_t LZ4F_decompress(LZ4F_dctx* dctx, * and start a new one using same context resources. */ LZ4FLIB_API void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx); /* always successful */ - -- + +size_t LZ4F_allocated_memory(LZ4F_dctx* dctx); - - #if defined (__cplusplus) - } + + /********************************** + * Dictionary compression API --- lib/lz4frame.c +++ lib/lz4frame.c -@@ -1097,6 +1097,11 @@ void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx) - dctx->dictSize = 0; +@@ -1334,6 +1334,11 @@ void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx) + dctx->frameRemainingSize = 0; } - + +size_t LZ4F_allocated_memory(LZ4F_dctx* dctx) +{ + return sizeof(*dctx) + dctx->tmpInSize + dctx->tmpOutSize; +} + - + /*! LZ4F_decodeHeader() : * input : `src` points at the **beginning of the frame** diff --git a/pp/third_party/patches/lz4/0003-fix_offsetof_calculation.patch b/pp/third_party/patches/lz4/0003-fix_offsetof_calculation.patch index 28cee378a..e70b9367a 100644 --- a/pp/third_party/patches/lz4/0003-fix_offsetof_calculation.patch +++ b/pp/third_party/patches/lz4/0003-fix_offsetof_calculation.patch @@ -1,13 +1,13 @@ --- lib/lz4hc.c +++ lib/lz4hc_patched.c -@@ -886,8 +886,8 @@ int LZ4_sizeofStateHC(void) { return (int)sizeof(LZ4_streamHC_t); } - * while actually aligning LZ4_streamHC_t on 4 bytes. */ +@@ -1488,8 +1488,8 @@ int LZ4_sizeofStateHC(void) { return (int)sizeof(LZ4_streamHC_t); } static size_t LZ4_streamHC_t_alignment(void) { -- struct { char c; LZ4_streamHC_t t; } t_a; -- return sizeof(t_a) - sizeof(t_a.t); + #if LZ4_ALIGN_TEST +- typedef struct { char c; LZ4_streamHC_t t; } t_a; +- return sizeof(t_a) - sizeof(LZ4_streamHC_t); + struct alignment_check_struct { char c; LZ4_streamHC_t t; }; + return offsetof(struct alignment_check_struct, t); - } + #else + return 1; /* effectively disabled */ #endif -