FreddieLiardet labeled issue #3710:
.clifTest Case
test.clif:test interpret function %abcdefghijklmopq(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmopq(1, 0) == 1 function %abcdefghijklmopqr(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmopqr(1, 0) == 1Steps to Reproduce
$ ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif FAIL cranelift/filetests/filetests/runtests/test.clif: interpret Caused by: unexpected trap: UnknownFunctionName("%abcdefghijklmopqr") 1 tests Error: 1 failureExpected Results
Both tests run without error.
Actual Results
Function with longer name causes error. (16 vs 17 chars)
Versions and Environment
Cranelift version or commit: 90e7cef56c03cd6644a991123a872d7e3b1c70c4
Operating system: Ubuntu 18.04
Architecture: x86_64
Extra Info
Seems to occur with
test interpret/; run: %functiononly.
FreddieLiardet labeled issue #3710:
.clifTest Case
test.clif:test interpret function %abcdefghijklmopq(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmopq(1, 0) == 1 function %abcdefghijklmopqr(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmopqr(1, 0) == 1Steps to Reproduce
$ ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif FAIL cranelift/filetests/filetests/runtests/test.clif: interpret Caused by: unexpected trap: UnknownFunctionName("%abcdefghijklmopqr") 1 tests Error: 1 failureExpected Results
Both tests run without error.
Actual Results
Function with longer name causes error. (16 vs 17 chars)
Versions and Environment
Cranelift version or commit: 90e7cef56c03cd6644a991123a872d7e3b1c70c4
Operating system: Ubuntu 18.04
Architecture: x86_64
Extra Info
Seems to occur with
test interpret/; run: %functiononly.
FreddieLiardet opened issue #3710:
.clifTest Case
test.clif:test interpret function %abcdefghijklmopq(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmopq(1, 0) == 1 function %abcdefghijklmopqr(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmopqr(1, 0) == 1Steps to Reproduce
$ ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif FAIL cranelift/filetests/filetests/runtests/test.clif: interpret Caused by: unexpected trap: UnknownFunctionName("%abcdefghijklmopqr") 1 tests Error: 1 failureExpected Results
Both tests run without error.
Actual Results
Function with longer name causes error. (16 vs 17 chars)
Versions and Environment
Cranelift version or commit: 90e7cef56c03cd6644a991123a872d7e3b1c70c4
Operating system: Ubuntu 18.04
Architecture: x86_64
Extra Info
Seems to occur with
test interpret/; run: %functiononly.
FreddieLiardet edited issue #3710:
.clifTest Case
test.clif:test interpret function %abcdefghijklmnop(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmnop(1, 0) == 1 function %abcdefghijklmnopq(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmnopq(1, 0) == 1Steps to Reproduce
$ ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif FAIL cranelift/filetests/filetests/runtests/test.clif: interpret Caused by: unexpected trap: UnknownFunctionName("%abcdefghijklmnopq") 1 tests Error: 1 failureExpected Results
Both tests run without error.
Actual Results
Function with longer name causes error. (16 vs 17 chars)
Versions and Environment
Cranelift version or commit: 90e7cef56c03cd6644a991123a872d7e3b1c70c4
Operating system: Ubuntu 18.04
Architecture: x86_64
Extra Info
Seems to occur with
test interpret/; run: %functiononly.
bjorn3 commented on issue #3710:
There is a hard-coded limit of 16 bytes for test case names. https://github.com/bytecodealliance/wasmtime/blob/90e7cef56c03cd6644a991123a872d7e3b1c70c4/cranelift/codegen/src/ir/extname.rs#L45 Replacing it with a
Box<[u8]>(orBox<str>would work I guess. It would increase the alignment ofExternalNamefrom 32bit to 64bit on 64bit systems though.
cfallin commented on issue #3710:
I believe this is an intentional limit meant to keep the size of instructions reasonable. We could indirect through a pool of names/labels held in the function, but that would add overhead for the common case. As suggested by the
TESTCASE_NAME_LENGTHconstant, this case is meant to be used for standalone tests rather than production embeddings, so the length restriction is IMHO not quite as critical.I'm doing some issue gardening and so I think I am going to go ahead and close this as "working according to design" but I'm open to arguments about how to support this (stuffing a
Boxinside the instruction just for the test use-case is probably not the right answer) if someone feels strongly.
cfallin closed issue #3710:
.clifTest Case
test.clif:test interpret function %abcdefghijklmnop(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmnop(1, 0) == 1 function %abcdefghijklmnopq(i64, i64) -> i64 { block0(v0: i64, v1: i64): v2 = iadd v0, v1 return v2 } ; run: %abcdefghijklmnopq(1, 0) == 1Steps to Reproduce
$ ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif FAIL cranelift/filetests/filetests/runtests/test.clif: interpret Caused by: unexpected trap: UnknownFunctionName("%abcdefghijklmnopq") 1 tests Error: 1 failureExpected Results
Both tests run without error.
Actual Results
Function with longer name causes error. (16 vs 17 chars)
Versions and Environment
Cranelift version or commit: 90e7cef56c03cd6644a991123a872d7e3b1c70c4
Operating system: Ubuntu 18.04
Architecture: x86_64
Extra Info
Seems to occur with
test interpret/; run: %functiononly.
Last updated: Dec 06 2025 at 06:05 UTC