mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-22 16:35:33 +00:00
Use starts_with for errors that always start with this string.
This commit is contained in:
@ -48,7 +48,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
let error_message = format!("{}", e);
|
||||
if error_message.contains("RuntimeError: ") && error_message.contains("out of bounds") {
|
||||
if error_message.starts_with("RuntimeError: ")
|
||||
&& error_message.contains("out of bounds")
|
||||
{
|
||||
return;
|
||||
}
|
||||
panic!("{}", e);
|
||||
|
@ -48,7 +48,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
let error_message = format!("{}", e);
|
||||
if error_message.contains("RuntimeError: ") && error_message.contains("out of bounds") {
|
||||
if error_message.starts_with("RuntimeError: ")
|
||||
&& error_message.contains("out of bounds")
|
||||
{
|
||||
return;
|
||||
}
|
||||
panic!("{}", e);
|
||||
|
@ -56,7 +56,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
let error_message = format!("{}", e);
|
||||
if error_message.contains("RuntimeError: ") && error_message.contains("out of bounds") {
|
||||
if error_message.starts_with("RuntimeError: ")
|
||||
&& error_message.contains("out of bounds")
|
||||
{
|
||||
return;
|
||||
}
|
||||
panic!("{}", e);
|
||||
|
@ -62,7 +62,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
let error_message = format!("{}", e);
|
||||
if error_message.contains("RuntimeError: ") && error_message.contains("out of bounds") {
|
||||
if error_message.starts_with("RuntimeError: ")
|
||||
&& error_message.contains("out of bounds")
|
||||
{
|
||||
return;
|
||||
}
|
||||
panic!("{}", e);
|
||||
|
@ -53,7 +53,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
let error_message = format!("{}", e);
|
||||
if error_message.contains("RuntimeError: ") && error_message.contains("out of bounds") {
|
||||
if error_message.starts_with("RuntimeError: ")
|
||||
&& error_message.contains("out of bounds")
|
||||
{
|
||||
return;
|
||||
}
|
||||
panic!("{}", e);
|
||||
|
Reference in New Issue
Block a user