Respectively describing allocated size vs commit size, relative to the
first subheap block, instead of size / commitSize.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
*(DWORD *)data is the value being compared; printing the 'data'
pointer itself provides little value here.
Signed-off-by: Martin Storsjö <martin@martin.st>
This is the same modification as the previous patch, applied on arm64.
It doesn't change the outcome for any of my tests though.
Signed-off-by: Martin Storsjö <martin@martin.st>
Don't just use ControlPcIsUnwound for picking which RUNTIME_FUNCTION
to use, but also use it for adjusting the pc value that is passed
to RtlVirtualUnwind.
This fixes one testcase (that I had missed to build and run before),
where the pc points at the start of an epilogue (which would mean
that no handler is returned from RtlVirtualUnwind). By taking
ControlPcIsUnwound and adjusting the pc pointer, the unwind handler
is returned and executed.
Signed-off-by: Martin Storsjö <martin@martin.st>
Clang generates SEH unwind info on ARM in both MSVC and mingw mode
since Clang 15. The unwind info gets which gets enabled automatically
by building with a new enough compiler.
For functions/trampolines that are implemented in assembly, the unwind
information needs to be provided by hand - in particular for cases
where unwinding should be diverted.
Contrary to AArch64, Clang got SEH assembler directives directly from
the start when SEH was implemented (when the __SEH__ compiler define
gets set), so there's no need for compiler version checks (like for
AArch64 in include/wine/asm.h), but the default check for __SEH__
works fine for enabling the __ARM_SEH() macro.
Use a custom unwind opcode in the private opcode space for unwinding
to a specific CONTEXT instead of up to the caller. (Contrary to
AArch64, there's no specific unwind opcode for restoring a full
CONTEXT, but the unwind opcode space does have a couple
unallocated values marked as "available", which can be used
for vendor specific needs here.)
This fixes unwinding in ARM PE builds.
Signed-off-by: Martin Storsjö <martin@martin.st>
Block sizes are now always rounded to ALIGNMENT multiple, except for
the last free block in a region. This makes it consistent and will let
us use a more compact block layout.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
The entry lpData pointer isn't a block but a pointer to the block data,
which has a different offset for free blocks and used blocks.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
It's allocated from the heap itself, should be freed even for the main
process heap, and before destroying the CS or notifying valgrind of used
block being freed.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Today, the UDF instruction handler code assumes Thumb mode code, and
cannot recognise the UDF.W form or equivalent instructions in ARM mode
encoding.
Fix this by generalising the UDF instruction parser code.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
__fastfail() is used by the Visual C++ runtime and Windows system
libraries to signal that the in-process state is corrupted and
unrecoverable.
If __fastfail() is invoked, the NT kernel raises a second-chance
non-continuable exception STATUS_STACK_BUFFER_OVERRUN. This quickly
terminates the process, bypassing all in-process exception handlers
(since they all rely on the potentially corrupted process state).
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>