[PATCH v2 0/5] git crashes with a SIGBUS on sparc64 during pull
- From
Jeff King <peff@peff.net>
- Date
- Jan 19, 2025, 13:12 UTC
- Message-ID
- <20250119131224.GA1541095@coredump.intra.peff.net>
- In-Reply-To
- <nwg0r52UT4d_kBbQa7V7xCWKxE1xtHiwXKtBvzEwxtJa-3nKpXcWG2DRGUENDSJQ9QOkk4jrEaXYjAbiSAZds2ynH1TZPcX3x6T_t4zm8s4=@protonmail.com>
Here's a v2 which fixes the reading side, as well. I think this should let you get through a full run of unpack-objects, but please confirm. :)
This also includes Junio's put_be32() tweak to silence sparse.
[1/5]: bswap.h: squelch potential sparse -Wcast-truncate warnings [2/5]: packfile: factor out --pack_header argument parsing [3/5]: parse_pack_header_option(): avoid unaligned memory writes [4/5]: index-pack, unpack-objects: use get_be32() for reading pack header [5/5]: index-pack, unpack-objects: use skip_prefix to avoid magic number
builtin/index-pack.c | 30 ++++++++++++------------------ builtin/unpack-objects.c | 31 ++++++++++++------------------- compat/bswap.h | 24 ++++++++++++------------ pack.h | 3 ++- packfile.c | 20 ++++++++++++++++++++ packfile.h | 6 ++++++ 6 files changed, 64 insertions(+), 50 deletions(-)
-Peff