mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-31 05:11:19 +00:00 
			
		
		
		
	set_exception_visitor: Remove the special case for wasi proc exit (#2525)
While wasi proc exit is not a real trap, what the runtime does on it is mostly same as real traps. That is, kill the siblings threads and represent the exit/trap as the result of the "process" to the user api. There seems no reason to distinguish it from real traps here. Note that: - The target thread either doesn't care the specific exception type or ignore wasi proc exit by themselves. (clear_wasi_proc_exit_exception) - clear_wasi_proc_exit_exception only clears local exception.
This commit is contained in:
		
							parent
							
								
									8c2dc1d011
								
							
						
					
					
						commit
						2e78230e06
					
				|  | @ -1260,12 +1260,8 @@ set_exception_visitor(void *node, void *user_data) | |||
| 
 | ||||
|         exception_lock(wasm_inst); | ||||
|         if (data->exception != NULL) { | ||||
|             /* Only spread non "wasi proc exit" exception */ | ||||
|             if (strcmp(data->exception, "wasi proc exit")) { | ||||
|                 snprintf(wasm_inst->cur_exception, | ||||
|                          sizeof(wasm_inst->cur_exception), "Exception: %s", | ||||
|                          data->exception); | ||||
|             } | ||||
|             snprintf(wasm_inst->cur_exception, sizeof(wasm_inst->cur_exception), | ||||
|                      "Exception: %s", data->exception); | ||||
|         } | ||||
|         else { | ||||
|             wasm_inst->cur_exception[0] = '\0'; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 YAMAMOTO Takashi
						YAMAMOTO Takashi