mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
lsteamclient: Propagate Unix side access violation to the PE side exception.
CW-Bug-Id: #23623
This commit is contained in:
parent
3cba1580fe
commit
a287ebaaf9
@ -73,6 +73,19 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
NTSTATUS steamclient_call( unsigned int code, void *args, const char *name )
|
||||
{
|
||||
NTSTATUS status = WINE_UNIX_CALL( code, args );
|
||||
|
||||
if (status == STATUS_ACCESS_VIOLATION)
|
||||
{
|
||||
ERR( "Access violation in %s.\n", name );
|
||||
RaiseException( status, 0, 0, NULL );
|
||||
}
|
||||
if (status) WARN( "%s failed, status %#x\n", name, (UINT)status );
|
||||
return status;
|
||||
}
|
||||
|
||||
static BYTE *alloc_start, *alloc_end;
|
||||
|
||||
static int8_t allocated_from_steamclient_dll( void *ptr )
|
||||
|
@ -216,10 +216,11 @@ struct networking_message
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
NTSTATUS steamclient_call( unsigned int code, void *args, const char *name );
|
||||
|
||||
#define STEAMCLIENT_CALL( code, args ) \
|
||||
({ \
|
||||
NTSTATUS status = WINE_UNIX_CALL( unix_ ## code, args ); \
|
||||
if (status) WARN( #code " failed, status %#x\n", (UINT)status ); \
|
||||
NTSTATUS status = steamclient_call( unix_ ## code, args, #code ); \
|
||||
assert( !status ); \
|
||||
status; \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user