Skip to content

Commit e693608

Browse files
log warning instaed of assertion (#4119)
1 parent f2e3348 commit e693608

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/iwasm/aot/aot_loader.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,12 @@ loader_mmap(uint32 size, bool prot_exec, char *error_buf, uint32 error_buf_size)
317317
map_flags = MMAP_MAP_32BIT;
318318
if ((mem = os_mmap(NULL, size, map_prot, map_flags,
319319
os_get_invalid_handle()))) {
320-
/* The mmapped memory must be in the first 2 Gigabytes of the
320+
/* Test whether the mmapped memory in the first 2 Gigabytes of the
321321
process address space */
322-
bh_assert((uintptr_t)mem < INT32_MAX);
322+
if ((uintptr_t)mem >= INT32_MAX)
323+
LOG_WARNING(
324+
"Warning: loader mmap memory address is not in the first 2 "
325+
"Gigabytes of the process address space.");
323326
return mem;
324327
}
325328
#endif

0 commit comments

Comments
 (0)