Skip to content

Conversation

@TianlongLiang
Copy link
Collaborator

And for existing test cases, fix some compile warnings

@TianlongLiang TianlongLiang force-pushed the dev/shared_heap_destroy branch from 9f1bf2d to 6c7ba78 Compare November 28, 2025 07:52
@TianlongLiang TianlongLiang marked this pull request as ready for review November 28, 2025 08:08
}
prev = prev->next;
cur = cur->next;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the process of looking for prev can be integrated into the above loop to ensure head_found.

But the current implementation is definitely functional. It is acceptable to keep it as is.

return false;
}
if (!is_chain_head) {
LOG_WARNING("Shared heap %p isn't the head of a shared heap chain.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppose there are two chains, A-B-C and B-C, and both need to be wasm_runtime_destroy_shared_heap() entire_chain.

First, destroy the first chain, which is A-B-C. When deleting up to C, it is discovered that C is not the head, and then the condition if (!is_chain_head) will fail and return.

@TianlongLiang TianlongLiang marked this pull request as draft December 2, 2025 04:50
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