Remove Allocations from Panic Handler#818
Conversation
c83158f to
93e8563
Compare
1b0113c to
576df92
Compare
2f25176 to
d786619
Compare
|
Just a note here, this is currently blocked on fuzzing failures due to the memory leak described in #826; currently attempting to use snapshotting in the host call fuzzer to restore back to a clean memory state on each fuzzing iteration, which I will open a separate PR for. |
Signed-off-by: adamperlin <adamp@nanosoft.com>
using a new FixedStringBuf type backed by a static mut array. Adds a test to verify that StackOverflow no longer occurs on OOM panic Signed-off-by: adamperlin <adamp@nanosoft.com>
Add some docstrings Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
…n panic handler to avoid any possible recursive panic Signed-off-by: adamperlin <adamp@nanosoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Perlin <adamp@nanosoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Perlin <adamp@nanosoft.com>
60a13c2 to
43e5480
Compare
…emove-allocations Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
9b59310 to
cf5efdb
Compare
ludfjig
left a comment
There was a problem hiding this comment.
Looks good to me. Let's see what others think!
…ort-based io directly to stream error messages to the host and avoid needing a fixed-size buffer in the panic handler. Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
…emove-allocations Signed-off-by: adamperlin <adamp@nanosoft.com>
Signed-off-by: adamperlin <adamp@nanosoft.com>
|
Sorry, I'm a bit late to the party but I think a similar problem exists in The additional problem in In result this I belive is UB: |
I'm aware of that one and am rewriting the whole exn handler at the moment anyway, so I was just going to roll it up in a slightly larger PR with the rest of the architecture stuff. Unless you are running into an urgent issue caused by this? |
|
Hey @syntactically, nothing urgent, no :) Great to hear you're working on this. |
|
I'm glad this is being worked on too! Thank you for bringing this up @andreiltd! @ludfjig @dblnz Could I get one more review on this? I've changed the approach based on @syntactically's suggestion so now there is no fixed-size buffer on the guest side! |
…emove-allocations Signed-off-by: adamperlin <adamp@nanosoft.com>
Co-authored-by: Dan Chiarlone <danilochiarlone@gmail.com> Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
This PR fixes #735. The approach used here is to write the formatted panic message in chunks to the host via
outbto avoid buffering on the host.