• Jinoh Kang's avatar
    ntdll/tests: Fix x86-32 extended context end offset in test_copy_context(). · 3995ff24
    Jinoh Kang authored
    The penultimate element of `ranges_x86` array has an incorrect value: it
    should be *at least* 0x2f0, which is the minimum size of an extended
    context.
    
    Fix this by setting it to 0x440, which is the minimum size of an
    extended context *with* CONTEXT_I386_XSTATE.  This is consistent with
    `ranges_amd64`, the penultimate element of which has the minimum size of
    an extended context *with* CONTEXT_AMD64_XSTATE.
    
    Note that the incorrect value does not always lead to a test failure,
    since check_changes_in_range_() effectively ignores range `start`s that
    are not in order.  Reproducing the failure requires a system with a
    sufficiently large XSAVE area; specifically, the following condition is
    necessary for check_changes_in_range_() to pick up the wrong value:
    
        0x2cc < 0x294 + src_ex->XState.Length - sizeof(XSTATE).
    3995ff24
exception.c 559 KB