mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-23 16:59:27 +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(_) => {}
|
Ok(_) => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let error_message = format!("{}", 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;
|
return;
|
||||||
}
|
}
|
||||||
panic!("{}", e);
|
panic!("{}", e);
|
||||||
|
@ -48,7 +48,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
|||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let error_message = format!("{}", 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;
|
return;
|
||||||
}
|
}
|
||||||
panic!("{}", e);
|
panic!("{}", e);
|
||||||
|
@ -56,7 +56,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
|||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let error_message = format!("{}", 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;
|
return;
|
||||||
}
|
}
|
||||||
panic!("{}", e);
|
panic!("{}", e);
|
||||||
|
@ -62,7 +62,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
|||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let error_message = format!("{}", 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;
|
return;
|
||||||
}
|
}
|
||||||
panic!("{}", e);
|
panic!("{}", e);
|
||||||
|
@ -53,7 +53,9 @@ fuzz_target!(|module: WasmSmithModule| {
|
|||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let error_message = format!("{}", 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;
|
return;
|
||||||
}
|
}
|
||||||
panic!("{}", e);
|
panic!("{}", e);
|
||||||
|
Reference in New Issue
Block a user