Stream: git-wasmtime

Topic: wasmtime / issue #9655 Cranelift: The `clif-util run` com...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 09:10):

abc767234318 opened issue #9655:

I constructed a clif file.

multi_func21_fail_to_find_function.zip

I used the following command to run it.

clif-util run -v file_tests/multi_func21.clif

But I got the following error:

file_tests/multi_func21_fail_to_find_function.clif: 1: expected a function name, e.g. %my_fn
1 file
Error: 1 failure

On line 872 I specify the name of the function to run: And the definition of u1:0 is on line 764.

; print: u1:0()

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 09:11):

abc767234318 edited issue #9655:

I constructed a clif file.

multi_func21_fail_to_find_function.zip

I used the following command to run it.

clif-util run -v file_tests/multi_func21.clif

But I got the following error:

file_tests/multi_func21_fail_to_find_function.clif: 1: expected a function name, e.g. %my_fn
1 file
Error: 1 failure

On line 872 I specify the name of the function to run: And the definition of u1:0 is on line 764.

; print: u1:0()

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 09:19):

bjorn3 commented on issue #9655:

I think you need to use a function name like %my_func instead of a function name like u1:0.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 09:26):

abc767234318 commented on issue #9655:

I think you need to use a function name like %my_func instead of a function name like u1:0.

The names of these functions are randomly generated, and they are named using numbers to facilitate subsequent analysis. In addition, other clif files I generated were named in a similar way and did not encounter this error.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2024 at 10:10):

bjorn3 commented on issue #9655:

At https://github.com/bytecodealliance/wasmtime/blob/5af89308dc0229ca404cd7000eec694201022e2d/cranelift/reader/src/parser.rs#L2731 the code for parsing ; print directives expects a Token::Name for the name of the function. %my_func is tokenized as Token::Name. u1:0 is not tokenized as Token::Name however. Only tokens that start with %.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2024 at 08:15):

abc767234318 closed issue #9655:

I constructed a clif file.

multi_func21_fail_to_find_function.zip

I used the following command to run it.

clif-util run -v file_tests/multi_func21.clif

But I got the following error:

file_tests/multi_func21_fail_to_find_function.clif: 1: expected a function name, e.g. %my_fn
1 file
Error: 1 failure

On line 872 I specify the name of the function to run: And the definition of u1:0 is on line 764.

; print: u1:0()

view this post on Zulip Wasmtime GitHub notifications bot (Nov 26 2024 at 08:15):

abc767234318 commented on issue #9655:

At

https://github.com/bytecodealliance/wasmtime/blob/5af89308dc0229ca404cd7000eec694201022e2d/cranelift/reader/src/parser.rs#L2731

the code for parsing ; print directives expects a Token::Name for the name of the function. %my_func is tokenized as Token::Name. u1:0 is not tokenized as Token::Name however. Only tokens that start with %.

Thank you very much, I will close this issue.


Last updated: Dec 23 2024 at 12:05 UTC