Skip to content

[mono][interp] Fix memory leaks for interpreted dynamic methods.#88892

Merged
vargaz merged 2 commits into
dotnet:mainfrom
vargaz:interp-memory
Jul 19, 2023
Merged

[mono][interp] Fix memory leaks for interpreted dynamic methods.#88892
vargaz merged 2 commits into
dotnet:mainfrom
vargaz:interp-memory

Conversation

@vargaz

@vargaz vargaz commented Jul 14, 2023

Copy link
Copy Markdown
Contributor
  • Add a mempool to MonoDynamicMethod.
  • Modify the intepreter code to allocate from this mempool when interpreting dynamic methods.

@ghost

ghost commented Jul 14, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Add a mempool to MonoDynamicMethod.
  • Modify the intepreter code to allocate from this mempool when interpreting dynamic methods.
Author: vargaz
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@vargaz

vargaz commented Jul 14, 2023

Copy link
Copy Markdown
Contributor Author

Ref: #87078

@vargaz

vargaz commented Jul 14, 2023

Copy link
Copy Markdown
Contributor Author

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz vargaz force-pushed the interp-memory branch 3 times, most recently from 136c83d to 066690c Compare July 14, 2023 05:03
@vargaz

vargaz commented Jul 14, 2023

Copy link
Copy Markdown
Contributor Author

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz

vargaz commented Jul 14, 2023

Copy link
Copy Markdown
Contributor Author

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/mono/mono/mini/interp/interp.c Outdated
…oDynamicMethod is allocated instead of a MonoMethodWrapper.
* Add a mempool to MonoDynamicMethod.
* Modify the intepreter code to allocate from this mempool when
  interpreting dynamic methods.
@vargaz vargaz marked this pull request as ready for review July 18, 2023 00:04
@vargaz vargaz merged commit fce5227 into dotnet:main Jul 19, 2023
@vargaz vargaz deleted the interp-memory branch July 19, 2023 05:41
@BrzVlad

BrzVlad commented Jul 19, 2023

Copy link
Copy Markdown
Member

I suspect this might have caused crashes like

Assertion at /home/vbrezae/Xamarin/repos/runtime/src/mono/mono/mini/interp/transform.c:8244, condition `td->new_code [reloc->offset + reloc->skip + 1] == 0xdead'

I am able to reproduce with moderate difficulty. I'm taking a look into it.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants