Stream: git-wasmtime

Topic: wasmtime / issue #4256 function collect_returns has very ...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 06:26):

yuyang-ok opened issue #4256:

this segment fault seens only on riscv64 platform, and only with doing the test with
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/filetests/filetests/runtests/i128-load-store.clif.

here are are gdb prompt

skipped cranelift/filetests/filetests/runtests/i128-load-store.clif: host can't run Aarch64(Aarch64) programs

Thread 3 "worker #0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7c08cd0 (LWP 426)]
alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
224 /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs: No such file or directory.
(gdb) backtrace
#0 alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
#1 0x0000555556574d5a in alloc::vec::Vec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::as_ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:1140
#2 0x000055555657a9d0 in alloc::vec::{impl#10}::deref<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2497
#3 0x0000555556579ad4 in alloc::vec::{impl#14}::clone<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2543
#4 0x0000555555c8553a in cranelift_codegen::ir::extfunc::{impl#8}::clone (self=0xf7fc23a00000800f) at cranelift/codegen/src/ir/extfunc.rs:28
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
#6 0x0000555555cb346e in cranelift_filetests::function_runner::CompiledFunction::call (self=0x7fff, arguments=...)
at cranelift/filetests/src/function_runner.rs:176
#7 0x0100000000000000 in ?? ()
(gdb) frame 5
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
221 let _signature = signature.clone();

![image](https://user-images.githubusercontent.com/96557710/173004027-e3e5f977-737a-4d3a-bae1-39c26950a09f.png)

there is noway I can't clone signature, bu it just happend.
looks like signature.returns has a wrong pointer.

assert!(self.0.len() >= signature.returns.len()); will segment fault too.


view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 06:27):

yuyang-ok edited issue #4256:

this segment fault seens only on riscv64 platform, and only with doing the test with
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/filetests/filetests/runtests/i128-load-store.clif.

here are are gdb prompt

skipped cranelift/filetests/filetests/runtests/i128-load-store.clif: host can't run Aarch64(Aarch64) programs

Thread 3 "worker #0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7c08cd0 (LWP 426)]
alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
224 /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs: No such file or directory.
(gdb) backtrace
#0 alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
#1 0x0000555556574d5a in alloc::vec::Vec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::as_ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:1140
#2 0x000055555657a9d0 in alloc::vec::{impl#10}::deref<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2497
#3 0x0000555556579ad4 in alloc::vec::{impl#14}::clone<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2543
#4 0x0000555555c8553a in cranelift_codegen::ir::extfunc::{impl#8}::clone (self=0xf7fc23a00000800f) at cranelift/codegen/src/ir/extfunc.rs:28
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
#6 0x0000555555cb346e in cranelift_filetests::function_runner::CompiledFunction::call (self=0x7fff, arguments=...)
at cranelift/filetests/src/function_runner.rs:176
#7 0x0100000000000000 in ?? ()
(gdb) frame 5
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
221 let _signature = signature.clone();

![image](https://user-images.githubusercontent.com/96557710/173004027-e3e5f977-737a-4d3a-bae1-39c26950a09f.png)

there is noway I can't clone signature, but it just happend.
looks like signature.returns has a wrong pointer.

assert!(self.0.len() >= signature.returns.len()); will segment fault too.


view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 06:31):

yuyang-ok edited issue #4256:

this segment fault seens only on riscv64 platform, and only with doing the test with
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/filetests/filetests/runtests/i128-load-store.clif.

here are are gdb prompt

skipped cranelift/filetests/filetests/runtests/i128-load-store.clif: host can't run Aarch64(Aarch64) programs

Thread 3 "worker #0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7c08cd0 (LWP 426)]
alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
224 /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs: No such file or directory.
(gdb) backtrace
#0 alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
#1 0x0000555556574d5a in alloc::vec::Vec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::as_ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:1140
#2 0x000055555657a9d0 in alloc::vec::{impl#10}::deref<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2497
#3 0x0000555556579ad4 in alloc::vec::{impl#14}::clone<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2543
#4 0x0000555555c8553a in cranelift_codegen::ir::extfunc::{impl#8}::clone (self=0xf7fc23a00000800f) at cranelift/codegen/src/ir/extfunc.rs:28
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
#6 0x0000555555cb346e in cranelift_filetests::function_runner::CompiledFunction::call (self=0x7fff, arguments=...)
at cranelift/filetests/src/function_runner.rs:176
#7 0x0100000000000000 in ?? ()
(gdb) frame 5
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
221 let _signature = signature.clone();

![image](https://user-images.githubusercontent.com/96557710/173004027-e3e5f977-737a-4d3a-bae1-39c26950a09f.png)

there is noway I can't clone signature, but it just happend.
looks like signature.returns has a wrong pointer.

assert!(self.0.len() >= signature.returns.len() /* will segment fault too. */ );


view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:06):

bjorn3 commented on issue #4256:

What does p *signature show?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:19):

yuyang-ok commented on issue #4256:

(gdb) backtrace
#0 alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
#1 0x0000555556574d5a in alloc::vec::Vec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::as_ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:1140
#2 0x000055555657a9d0 in alloc::vec::{impl#10}::deref<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2497
#3 0x0000555556579ad4 in alloc::vec::{impl#14}::clone<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2543
#4 0x0000555555c8553a in cranelift_codegen::ir::extfunc::{impl#8}::clone (self=0xf7fc23a00000800f) at cranelift/codegen/src/ir/extfunc.rs:28
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
#6 0x0000555555cb346e in cranelift_filetests::function_runner::CompiledFunction::call (self=0x7fff, arguments=...)
at cranelift/filetests/src/function_runner.rs:176
#7 0x0100000000000000 in ?? ()
(gdb) frame 5
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
221 let _signature = signature.clone();
(gdb) p *signature
Cannot access memory at address 0xf7fc23a00000800f

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:20):

bjorn3 commented on issue #4256:

And what does info proc maps show?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:23):

yuyang-ok commented on issue #4256:

(gdb) info proc maps
Too many parameters: maps

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:28):

bjorn3 commented on issue #4256:

I meant info proc map without the s. My bad.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:29):

yuyang-ok commented on issue #4256:

Mapped address spaces:

      Start Addr           End Addr       Size     Offset objfile
  0x555555555000     0x555556ffc000  0x1aa7000        0x0 /root/share/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util
  0x555556ffc000     0x5555571c9000   0x1cd000  0x1aa6000 /root/share/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util
  0x5555571c9000     0x5555571cd000     0x4000  0x1c73000 /root/share/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util
  0x5555571cd000     0x5555571ef000    0x22000        0x0 [heap]
  0x7fffd0000000     0x7fffd0021000    0x21000        0x0
  0x7fffd0021000     0x7fffd4000000  0x3fdf000        0x0
  0x7fffd4000000     0x7fffd4021000    0x21000        0x0
  0x7fffd4021000     0x7fffd8000000  0x3fdf000        0x0
  0x7fffd8000000     0x7fffd8021000    0x21000        0x0
  0x7fffd8021000     0x7fffdc000000  0x3fdf000        0x0
  0x7fffdc000000     0x7fffdc021000    0x21000        0x0
  0x7fffdc021000     0x7fffe0000000  0x3fdf000        0x0
  0x7fffe0000000     0x7fffe0021000    0x21000        0x0
  0x7fffe0021000     0x7fffe4000000  0x3fdf000        0x0
  0x7fffe4000000     0x7fffe4021000    0x21000        0x0
  0x7fffe4021000     0x7fffe8000000  0x3fdf000        0x0
  0x7fffe8000000     0x7fffe8021000    0x21000        0x0
  0x7fffe8021000     0x7fffec000000  0x3fdf000        0x0
  0x7fffec000000     0x7fffec021000    0x21000        0x0
  0x7fffec021000     0x7ffff0000000  0x3fdf000        0x0
  0x7ffff0000000     0x7ffff0021000    0x21000        0x0
  0x7ffff0021000     0x7ffff4000000  0x3fdf000        0x0
  0x7ffff6bed000     0x7ffff6bee000     0x1000        0x0
  0x7ffff6bee000     0x7ffff6dee000   0x200000        0x0
  0x7ffff6df1000     0x7ffff6df2000     0x1000        0x0
  0x7ffff6df2000     0x7ffff6ff2000   0x200000        0x0
  0x7ffff6ff8000     0x7ffff6ff9000     0x1000        0x0
  0x7ffff6ff9000     0x7ffff71f9000   0x200000        0x0
  0x7ffff71f9000     0x7ffff71fa000     0x1000        0x0
  0x7ffff71fa000     0x7ffff73fa000   0x200000        0x0
  0x7ffff73fd000     0x7ffff73fe000     0x1000        0x0
  0x7ffff73fe000     0x7ffff75fe000   0x200000        0x0
  0x7ffff7601000     0x7ffff7602000     0x1000        0x0

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:30):

yuyang-ok commented on issue #4256:

0x7ffff7602000 0x7ffff7802000 0x200000 0x0
0x7ffff7805000 0x7ffff7806000 0x1000 0x0
0x7ffff7806000 0x7ffff7a06000 0x200000 0x0
0x7ffff7a06000 0x7ffff7a07000 0x1000 0x0
0x7ffff7a07000 0x7ffff7a09000 0x2000 0x0
0x7ffff7a09000 0x7ffff7a0a000 0x1000 0x0
0x7ffff7a0a000 0x7ffff7c0a000 0x200000 0x0
0x7ffff7c0a000 0x7ffff7c0b000 0x1000 0x0
0x7ffff7c0b000 0x7ffff7c0d000 0x2000 0x0
0x7ffff7c0d000 0x7ffff7c0e000 0x1000 0x0
0x7ffff7c0e000 0x7ffff7e10000 0x202000 0x0
0x7ffff7e10000 0x7ffff7f13000 0x103000 0x0 /lib/riscv64-linux-gnu/libc-2.33.so
0x7ffff7f13000 0x7ffff7f17000 0x4000 0x102000 /lib/riscv64-linux-gnu/libc-2.33.so
0x7ffff7f17000 0x7ffff7f19000 0x2000 0x106000 /lib/riscv64-linux-gnu/libc-2.33.so
0x7ffff7f19000 0x7ffff7f21000 0x8000 0x0
0x7ffff7f21000 0x7ffff7f23000 0x2000 0x0 /lib/riscv64-linux-gnu/libdl-2.33.so
0x7ffff7f23000 0x7ffff7f24000 0x1000 0x1000 /lib/riscv64-linux-gnu/libdl-2.33.so
0x7ffff7f24000 0x7ffff7f25000 0x1000 0x2000 /lib/riscv64-linux-gnu/libdl-2.33.so
0x7ffff7f25000 0x7ffff7fa6000 0x81000 0x0 /lib/riscv64-linux-gnu/libm-2.33.so
0x7ffff7fa6000 0x7ffff7fa7000 0x1000 0x81000 /lib/riscv64-linux-gnu/libm-2.33.so
0x7ffff7fa7000 0x7ffff7fa8000 0x1000 0x81000 /lib/riscv64-linux-gnu/libm-2.33.so
0x7ffff7fa8000 0x7ffff7fa9000 0x1000 0x82000 /lib/riscv64-linux-gnu/libm-2.33.so
0x7ffff7fa9000 0x7ffff7fbd000 0x14000 0x0 /lib/riscv64-linux-gnu/libpthread-2.33.so
0x7ffff7fbd000 0x7ffff7fbe000 0x1000 0x13000 /lib/riscv64-linux-gnu/libpthread-2.33.so
0x7ffff7fbe000 0x7ffff7fbf000 0x1000 0x14000 /lib/riscv64-linux-gnu/libpthread-2.33.so
0x7ffff7fbf000 0x7ffff7fc3000 0x4000 0x0
0x7ffff7fc3000 0x7ffff7fd5000 0x12000 0x0 /lib/riscv64-linux-gnu/libgcc_s.so.1
0x7ffff7fd5000 0x7ffff7fd6000 0x1000 0x11000 /lib/riscv64-linux-gnu/libgcc_s.so.1
0x7ffff7fd6000 0x7ffff7fd7000 0x1000 0x12000 /lib/riscv64-linux-gnu/libgcc_s.so.1
0x7ffff7fd7000 0x7ffff7fd9000 0x2000 0x0
0x7ffff7fd9000 0x7ffff7fda000 0x1000 0x0
0x7ffff7fda000 0x7ffff7fdb000 0x1000 0x0
0x7ffff7fdb000 0x7ffff7fdd000 0x2000 0x0
0x7ffff7fdd000 0x7ffff7fdf000 0x2000 0x0 [vvar]
0x7ffff7fdf000 0x7ffff7fe1000 0x2000 0x0 [vdso]
0x7ffff7fe1000 0x7ffff7ffc000 0x1b000 0x0 /lib/riscv64-linux-gnu/ld-2.33.so
0x7ffff7ffc000 0x7ffff7ffd000 0x1000 0x0

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:31):

yuyang-ok commented on issue #4256:

0x7ffff7ffd000 0x7ffff7ffe000 0x1000 0x1b000 /lib/riscv64-linux-gnu/ld-2.33.so
0x7ffff7ffe000 0x7ffff8000000 0x2000 0x1c000 /lib/riscv64-linux-gnu/ld-2.33.so
0x7ffffffdf000 0x800000000000 0x21000 0x0 [stack]

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:39):

bjorn3 commented on issue #4256:

Looks like that pointer is getting corrupted pretty badly. There is no memory mapped nearby. You may need to poke around in CompiledFunction::call and elsewhere to see where the bad pointer originated from.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 07:41):

yuyang-ok commented on issue #4256:

ok

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 08:08):

yuyang-ok edited a comment on issue #4256:

ok,thanks.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 23:37):

yuyang-ok commented on issue #4256:

maybe My some other code corrupted the pointer,I need some time to figure out. close it for now.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 10 2022 at 23:37):

yuyang-ok closed issue #4256:

this segment fault seens only on riscv64 platform, and only with doing the test with
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/filetests/filetests/runtests/i128-load-store.clif.

here are are gdb prompt

skipped cranelift/filetests/filetests/runtests/i128-load-store.clif: host can't run Aarch64(Aarch64) programs

Thread 3 "worker #0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7c08cd0 (LWP 426)]
alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
224 /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs: No such file or directory.
(gdb) backtrace
#0 alloc::raw_vec::RawVec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/raw_vec.rs:224
#1 0x0000555556574d5a in alloc::vec::Vec<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global>::as_ptr<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f) at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:1140
#2 0x000055555657a9d0 in alloc::vec::{impl#10}::deref<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2497
#3 0x0000555556579ad4 in alloc::vec::{impl#14}::clone<cranelift_codegen::ir::extfunc::AbiParam, alloc::alloc::Global> (self=0xf7fc23a00000800f)
at /rustc/c35035cefc709abddabfb28ecc6a326458d46ce2/library/alloc/src/vec/mod.rs:2543
#4 0x0000555555c8553a in cranelift_codegen::ir::extfunc::{impl#8}::clone (self=0xf7fc23a00000800f) at cranelift/codegen/src/ir/extfunc.rs:28
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
#6 0x0000555555cb346e in cranelift_filetests::function_runner::CompiledFunction::call (self=0x7fff, arguments=...)
at cranelift/filetests/src/function_runner.rs:176
#7 0x0100000000000000 in ?? ()
(gdb) frame 5
#5 0x0000555555cb3786 in cranelift_filetests::function_runner::UnboxedValues::collect_returns (self=0x7ffff7c01b08, signature=0xf7fc23a00000800f)
at cranelift/filetests/src/function_runner.rs:221
221 let _signature = signature.clone();

![image](https://user-images.githubusercontent.com/96557710/173004027-e3e5f977-737a-4d3a-bae1-39c26950a09f.png)

there is noway I can't clone signature, but it just happend.
looks like signature.returns has a wrong pointer.

assert!(self.0.len() >= signature.returns.len() /* will segment fault too. */ );



Last updated: Nov 22 2024 at 16:03 UTC