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

mmap doesn't support MAP_ANONYMOUS #105

Open
mpiraux opened this issue May 20, 2020 · 0 comments
Open

mmap doesn't support MAP_ANONYMOUS #105

mpiraux opened this issue May 20, 2020 · 0 comments

Comments

@mpiraux
Copy link

mpiraux commented May 20, 2020

Currently, calling mmap with the flag MAP_ANONYMOUS returns EBADF.
The mmap code looks for a file descriptor no matter what flags are passed, hence the error raised.

void * dce_mmap64 (void *start, size_t length, int prot, int flags,
                   int fd, off64_t offset)
{
  Thread *current = Current ();
  NS_LOG_FUNCTION (current << UtilsGetNodeId () << start << length << prot << flags << fd << offset);
  NS_ASSERT (current != 0);

  OPENED_FD_METHOD_ERR (MAP_FAILED, void *, Mmap (start, length, prot, flags, offset))
}
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

No branches or pull requests

1 participant