fitzgen requested alexcrichton for a review on PR #3734.
fitzgen opened PR #3734 from externref-debug-assertion-fix
to main
:
See commit messages for details.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
I don't think I understand why this is necessary, but was this required from fuzzing?
Unlike the
wasmtime_activations_table_insert_with_gc
function above theexternref
here is not on the stack in wasm, it's only on the stack here in Rust, and it's already rooted with theSome(externref)
which should be an owned value.I think that means that there's no need to manually insert it into the table because a stack walk otherwise won't find this (unless it would otherwise find it for some other reason)
alexcrichton created PR review comment:
This can end up doing a double-insertion between this and
insert_with_gc
below, and it might be good to avoid that? This method is only called when the table is full soinsert_without_gc
is already guaranteed to go straight to insertion in the slow path, so should a specialized method of the table be added for basically this use case?
fitzgen submitted PR review.
fitzgen created PR review comment:
It won't insert into the bump chunk, so I don't think there is anything to worry about here. We just do one more hash lookup than is strictly necessary, but that is fine as this is a slow path anyways.
fitzgen created PR review comment:
No, this isn't required, it was just me being overly cautious. I'll remove it and force push.
fitzgen submitted PR review.
fitzgen updated PR #3734 from externref-debug-assertion-fix
to main
.
fitzgen updated PR #3734 from externref-debug-assertion-fix
to main
.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
That's true, yeah. Could you update the comment here to indicate that this is doing some extra work but it's the slow path so it should be ok?
fitzgen updated PR #3734 from externref-debug-assertion-fix
to main
.
fitzgen merged PR #3734.
Last updated: Nov 22 2024 at 17:03 UTC