Stream: git-wasmtime

Topic: wasmtime / issue #5786 s390x: Fix instruction encoding an...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 15 2023 at 15:05):

afonso360 commented on issue #5786:

Hey, I'm trying to understand why fuzzgen didn't catch this when you ran it a few weeks ago. This encoding error only triggers when we try to add a 16bit value directly from memory to a 32 bit register right?

I think fuzzgen can already generate code like that, although we only ever load from the stack, does s390x select a different encoding in those cases?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 15 2023 at 15:09):

uweigand commented on issue #5786:

Hey, I'm trying to understand why fuzzgen didn't catch this when you ran it a few weeks ago. This encoding error only triggers when we try to add a 16bit value directly from memory to a 32 bit register right?

Yes, and in addition the memory access must use a displacement of 4096 or larger. For smaller displacements, the (correctly encoded) AH instruction is used instead of AHY. This is probably a rare case - not sure if the fuzzer tries to enforce large displacements.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 15 2023 at 15:16):

afonso360 commented on issue #5786:

Oh! That explains it, We constrain the stack size quite a lot. We should probably increase that. Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Feb 15 2023 at 15:18):

afonso360 edited a comment on issue #5786:

Oh! That explains it, We constrain the stack size quite a lot. We should probably increase that. Thanks!

Edit: Just looked it up, our max stack size is 1024, which is really low.


Last updated: Dec 23 2024 at 13:07 UTC