Skip to content

runtime: addrspace_free in mem_linux.c is not reliable #7476

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

Closed
ianlancetaylor opened this issue Mar 5, 2014 · 2 comments
Closed

runtime: addrspace_free in mem_linux.c is not reliable #7476

ianlancetaylor opened this issue Mar 5, 2014 · 2 comments
Milestone

Comments

@ianlancetaylor
Copy link
Member

The addrspace_free function in runtime/mem_linux.c checks large chunks of memory using
mincore.  mincore returns 0 if the memory is accessible, ENOMEM if some of the memory is
unmapped.  The current code seems to think that ENOMEM is returned if all of the memory
is unmapped, but that is not correct.  ENOMEM is returned if only some of the memory is
unmapped.  Since we normally map only some of the memory, this means that addrspace_free
does not actually return whether the address space is free.
@rsc
Copy link
Contributor

rsc commented Apr 3, 2014

Comment 1:

https://golang.org/cl/84000043

Owner changed to @rsc.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Apr 3, 2014

Comment 2:

This issue was closed by revision 0e1b6bb.

Status changed to Fixed.

@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc removed their assignment Jun 23, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants