Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not call cont.new in start section #184

Open
oovm opened this issue May 23, 2024 · 3 comments
Open

Can not call cont.new in start section #184

oovm opened this issue May 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@oovm
Copy link

oovm commented May 23, 2024

If change this example(https://github.com/wasmfx/wasmfxtime/blob/main/tests/misc_testsuite/typed-continuations/cont_new.wast) to

(module
    (type $ft (func))
    (type $ct (cont $ft))
    (elem declare func $noop)

    (func $noop)
    (func $make-cont (result (ref $ct))
        (cont.new $ct (ref.func $noop))
    )
    (func $f (export "f") (result i32)
        (call $make-cont)
        (ref.is_null)
    )
    (func $main
        (call $f)
        drop
    )
    (start $main)
)

Result is

error: test failed, to rerun pass `--test main`

Caused by:
  process didn't exit successfully: (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
note: test exited abnormally
error: 1 target failed:
    `--test main`

No stack traceback information

@oovm oovm added the bug Something isn't working label May 23, 2024
@dhil
Copy link
Member

dhil commented May 23, 2024

Thanks for the report! What command did you use to run the program? I'd like to reproduce.

@oovm
Copy link
Author

oovm commented May 23, 2024

The complete environment is more complicated, you can use this function:

https://github.com/valkyrie-language/valkyrie-runtime/blob/7854fe0462e8c9b2862abd179a6472691c01a240/projects/runtime/tests/main.rs#L22-L27

Running command is (IDE-generated)

cargo test --package nyar-runtime --test main test_empty_kont -- --nocapture --exact

Source code is:

https://github.com/valkyrie-language/valkyrie-runtime/blob/7854fe0462e8c9b2862abd179a6472691c01a240/projects/runtime/tests/kont.wat#L39-L59

The component part is useless, it is only used to print the value.

@oovm
Copy link
Author

oovm commented May 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants