From e2075076dfdbd78e8681d4f85b8e2a33826bc4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= Date: Mon, 27 Apr 2026 21:45:15 +0200 Subject: [PATCH] Add at least the first two feature_layouts in xsave_layout_from_trace. This fixes a regression introduced by 2c1d0b2377, which gets only visible if no supported_feature_bits are set above the first two bits, which is the case for a Intel Pentium B950 from 2011. There it surfaces in the tcp_sockets test, with the dump crashing. --- src/util.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.cc b/src/util.cc index 9ac2c7b06d9..dbd75a99261 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1635,6 +1635,10 @@ XSaveLayout xsave_layout_from_trace(const std::vector records) { layout.supported_feature_bits = cpuid_data.out.eax | (uint64_t(cpuid_data.out.edx) << 32); + // Add at least the first two entries in case there are no feature_bits set above 2 + while (layout.feature_layouts.size() < 2) { + layout.feature_layouts.push_back({ 0, 0 }); + } for (size_t i = 2; i < 64; ++i) { if (layout.supported_feature_bits & (uint64_t(1) << i)) { do {