iovisor / ubpf

Userspace eBPF VM
Apache License 2.0
814 stars 132 forks source link

Support external stacks and local function calls using local memory #460

Closed hawkinsw closed 4 months ago

hawkinsw commented 4 months ago
  1. Add support for invoking the interpreter and JIT'd code with an external stack. This feature is generally useful and will also make it easier to fuzz the runtime and check for correctness.
  2. Add support for local functions that use local memory. Prior to this commit, a local function could be called but could not use any local memory (without overwriting memory from another function).
coveralls commented 4 months ago

Coverage Status

coverage: 81.498%. first build when pulling 7208c4b667faafe1c4035bf55300d8d8b4572a3c on hawkinsw:local_call_external_stack into 3fb3da0ffef98be661bebae05043af0f14cfbed4 on iovisor:main.

Alan-Jowett commented 4 months ago

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

hawkinsw commented 4 months ago

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

hawkinsw commented 4 months ago

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

Alan-Jowett commented 4 months ago

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

OK, it might just be possible the code wasn't formatted correctly to begin with. Which version of clang-format did you use?

hawkinsw commented 4 months ago

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

OK, it might just be possible the code wasn't formatted correctly to begin with. Which version of clang-format did you use?

I will check!! I am constantly amazed how version-specific the formatter is! This problem occurs with another project I am working on, too.

Alan-Jowett commented 4 months ago

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

OK, it might just be possible the code wasn't formatted correctly to begin with. Which version of clang-format did you use?

I will check!! I am constantly amazed how version-specific the formatter is! This problem occurs with another project I am working on, too.

If you want, we can pick-up a newer version of the formatter if that helps. I think this is using the same one as eBPF-for-Windows, which is using a really old version (due to a dependency on an older version of Clang).

If that is a route we want to pursue, I would suggest making the changes as a separate formatting only PR.