mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-31 05:11:19 +00:00 
			
		
		
		
	NuttX: Fix a dbus-related crash on esp32s3 (#3470)
Although I don't know what exactly the esp32s3 rom version of memset is, it seems that the current code crashes only with a small "len". I guess it changes the logic depending on the size. Anyway, it's safer to use dbus here.
This commit is contained in:
		
							parent
							
								
									a9eff69dd9
								
							
						
					
					
						commit
						6067dbb3ab
					
				|  | @ -53,7 +53,13 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file) | |||
|     if ((prot & MMAP_PROT_EXEC) != 0) { | ||||
|         p = up_textheap_memalign(sizeof(void *), size); | ||||
|         if (p) { | ||||
| #if (WASM_MEM_DUAL_BUS_MIRROR != 0) | ||||
|             void *dp = os_get_dbus_mirror(p); | ||||
|             memset(dp, 0, size); | ||||
|             os_dcache_flush(); | ||||
| #else | ||||
|             memset(p, 0, size); | ||||
| #endif | ||||
|         } | ||||
|         return p; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 YAMAMOTO Takashi
						YAMAMOTO Takashi