[PATCH v4 2/4] ntdll: Implement RtlWalkFrameChain() for x86 and x86_64.
Giovanni Mascellani
gmascellani at codeweavers.com
Tue Nov 2 10:40:57 CDT 2021
Hi,
On 01/11/21 12:13, Paul Gofman wrote:
> + for (requested_count = frame_count - 1; requested_count < frame_count + 1; ++requested_count)
> + {
> + for (i = 0; i < 32; ++i)
> + {
> + winetest_push_context("requested_count %u, i %u", requested_count, i);
> + skip_count = (1 << i) >> 8;
> +
> + if (i < RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT
> + || i >= RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT + 8)
> + expected = 0;
> + else
> + expected = min(frame_count, requested_count);
Notice that requested_count is either frame_count or frame_count - 1, so
that min() always returns requested_count. Not sure if you also meant to
test requested_count == frame_count + 1 and got on off by one.
Giovanni.
More information about the wine-devel
mailing list