mirror of
https://github.com/holub/mame
synced 2025-06-01 02:21:48 +03:00
02104: metlhawk, metlhwkj: Crash while decoding with '-debug' trigger
Fixed auto_malloc() along the way to randomize its memory when allocated in the debug build. This used to be the standard, but it seems to have been removed when the pool allocation was moved into the library.
This commit is contained in:
parent
fc7e4f0f46
commit
74d7495dbc
@ -199,7 +199,11 @@ void *restrack_register_object(object_type type, void *ptr, size_t size, const c
|
||||
|
||||
void *auto_malloc_file_line(size_t size, const char *file, int line)
|
||||
{
|
||||
return pool_malloc_file_line(current_pool(), size, file, line);
|
||||
void *result = pool_malloc_file_line(current_pool(), size, file, line);
|
||||
#ifdef MAME_DEBUG
|
||||
rand_memory(result, size);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -273,7 +277,8 @@ bitmap_t *auto_bitmap_alloc_file_line(int width, int height, bitmap_format forma
|
||||
|
||||
/*-------------------------------------------------
|
||||
validate_auto_malloc_memory - validate that a
|
||||
block of memory has been allocated by auto_malloc()
|
||||
block of memory has been allocated by
|
||||
auto_malloc()
|
||||
-------------------------------------------------*/
|
||||
|
||||
void validate_auto_malloc_memory(void *memory, size_t memory_size)
|
||||
|
@ -1082,6 +1082,7 @@ roz_get_info( running_machine *machine, tile_data *tileinfo, int tile_index, int
|
||||
if( tile&0x0200 ) mangle |= 0x0400;
|
||||
if( tile&0x0400 ) mangle |= 0x0800;
|
||||
if( tile&0x0800 ) mangle |= 0x1000;
|
||||
tile &= 0x3fff; /* cap mask offset */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user