]> git.ipfire.org Git - thirdparty/xz.git/commit
liblzma: Fix false Valgrind error report with GCC.
authorJia Tan <jiat0218@gmail.com>
Sat, 9 Mar 2024 01:20:57 +0000 (09:20 +0800)
committerJia Tan <jiat0218@gmail.com>
Sat, 9 Mar 2024 01:20:57 +0000 (09:20 +0800)
commit82ecc538193b380a21622aea02b0ba078e7ade92
treee7f270edf8d9f9510ab4182e896eb1f091bd0b62
parent3007e74ef250f0ce95d97ffbdf2282284f93764d
liblzma: Fix false Valgrind error report with GCC.

With GCC and a certain combination of flags, Valgrind will falsely
trigger an invalid write. This appears to be due to the omission of
instructions to properly save, set up, and restore the frame pointer.

The IFUNC resolver is a leaf function since it only calls a function
that is inlined. So sometimes GCC omits the frame pointer instructions
in the resolver unless this optimization is explictly disabled.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2267598.
src/liblzma/check/crc32_fast.c
src/liblzma/check/crc64_fast.c
src/liblzma/check/crc_common.h