dxx-rebirth/common
Kp 32daf8e8c3 Handle unaligned stack during Win32 hexdump logging
The dump logger probes for the end of the stack, then rounds down to the
nearest paragraph boundary to simplify the logic in the hexdump routine.
The termination condition in the hexdump code assumed that there would
exist an integer N such that (`start` + (16 * N) == `end`).  Since `end`
is rounded to a multiple of 16, this held if and only if `start` is also
a multiple of 16.  In practice, this tended to happen, but it was not
guaranteed by the code.  If it ever failed to happen, then the hexdump
routine would not terminate and would instead perform an invalid read
beyond the edge of the stack.

Modify the hexdump routine to round `start` to a multiple of 16 so that
the termination condition works as intended.  This has the useful side
effect that hex dumps now always start paragraph aligned.  When the
stack was not paragraph aligned, this change will cause the hexdump to
show bytes below the stack pointer at the time of the fault.  However,
the stack requirements of the handler itself ensure that these bytes
will be valid.
2017-06-03 17:11:12 +00:00
..
2d Work around i686-w64-mingw32-g++ compiler crash 2017-04-22 21:23:55 +00:00
3d Pass up various return values 2017-02-26 00:00:02 +00:00
arch Handle unaligned stack during Win32 hexdump logging 2017-06-03 17:11:12 +00:00
editor Cache canvas in print_clock 2017-02-11 21:42:34 +00:00
include Pass grs_canvas &to draw_object_picture 2017-04-30 16:25:16 +00:00
main Fix label truncation when strlen(hats) + 1 < strlen(buttons) 2017-05-13 04:19:39 +00:00
maths Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR 2016-09-11 18:49:16 +00:00
mem Use array<> for memdebug data 2016-10-29 23:16:15 +00:00
misc Fix check_header_includes=1 poison.h 2017-02-19 19:33:36 +00:00
texmap Simplify draw_tmap interpolation 2017-03-10 01:22:24 +00:00
ui Pass canvas to gr_init_font 2017-03-11 19:56:22 +00:00