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

Update simple test #25

Merged
merged 1 commit into from
Jan 23, 2023
Merged

Update simple test #25

merged 1 commit into from
Jan 23, 2023

Conversation

loganek
Copy link
Collaborator

@loganek loganek commented Jan 9, 2023

  • don't assume the return value of the __wasi_thread_spawn API should be zero; assert on thread ID
  • implement wasi_thread_start in ASM to avoid potential stack corruption

@yamt
Copy link
Contributor

yamt commented Jan 10, 2023

do you want to keep this while #19 has a similar coverage?

@yamt yamt mentioned this pull request Jan 11, 2023
@loganek
Copy link
Collaborator Author

loganek commented Jan 11, 2023

do you want to keep this while #19 has a similar coverage?

Good point; I think we can keep it and use it as an example for C.

@yamt
Copy link
Contributor

yamt commented Jan 13, 2023

do you want to keep this while #19 has a similar coverage?

Good point; I think we can keep it and use it as an example for C.

but this is now involving asm.

@loganek
Copy link
Collaborator Author

loganek commented Jan 20, 2023

Yes, partially. However, most of that is C, so I still see the value of having that one test. We could possibly reduce the amount of asm code by having a small trampoline function written in C with asm inlines for setting stack pointer and force compile it with optimizations (IIRC, that is safe and won't generate code that uses stack pointer). But that will only limit the amount of asm code, won't eliminate it completely.

 * don't assume the return value of the `__wasi_thread_spawn` API should be zero; assert on thread ID
 * implement wasi_thread_start in ASM to avoid potential stack corruption
@loganek loganek merged commit 372f6fe into WebAssembly:main Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants