Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract_imports and extract_memories do push_memory duplicated inModule::instantiate #587

Closed
yjhmelody opened this issue Dec 6, 2022 · 5 comments · Fixed by #593
Closed

Comments

@yjhmelody
Copy link
Contributor

yjhmelody commented Dec 6, 2022

When building module, memory is collected by both imports and memories now.

What I means Memory::new is called twice when there is only one import "env" "memory".
The first one is called by me for pass it to linker, but the second one is called by extract_memories.
But if we do not import memory, Memory::new never be called.

@yjhmelody yjhmelody changed the title extract_imports and extract_memories do push_memory duplicated ininstantiate extract_imports and extract_memories do push_memory duplicated inModule::instantiate Dec 6, 2022
@Robbepop
Copy link
Member

Robbepop commented Dec 7, 2022

Sorry but I don't understand at all what exactly the problem is supposed to be here.
Can you please provide a .wat file example or (preferably) paste some .wat code that does not work as intended?

@yjhmelody
Copy link
Contributor Author

Ok, I will add a test to show it.

@yjhmelody
Copy link
Contributor Author

See #589

@yjhmelody
Copy link
Contributor Author

Hi @Robbepop Could you give me some feedback?

@Robbepop
Copy link
Member

Sorry, my initial answer was wrong, so I deleted it again, then I forgot to write another. I wrote a new answer as review comment to your PR.

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 a pull request may close this issue.

2 participants