-
Notifications
You must be signed in to change notification settings - Fork 814
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 fails with ENOMEM if provided addr, MAP_PRIVATE, fd and offset not a multiple of 0x10000 #7569
Comments
also buggy on WSL2 (32GB RAM) Microsoft Windows 10 Pro 10.0.19043 ../../runtime/bin/snapshot_utils.cc: 143: error: Failed to memory map snapshot: /home/mh/flutter/bin/cache/dart-sdk/bin/snapshots/dartdev.dart.snapshot version=2.15.0-178.1.beta (beta) (Tue Oct 12 11:11:28 2021 +0200) on "linux_x64" |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Version
Microsoft Windows [Version 10.0.19041.1237]
WSL Version
Kernel Version
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1237-Microsoft Sat Sep 11 14:32:00 PST 2021
Distro Version
Ubuntu 20.04.3 LTS
Other Software
No response
Repro Steps
This came to light due to a recent update of the dart-sdk tools that a call to mmap that previously looked like:
now looks like:
and fails with
ENOMEM
Note that the provided offset of 0x1cac000 is a multiple of the value provided by
sysconf(_SC_PAGE_SIZE)
. It appears that using an offset that is a multiple of 0x10000 (16 times the reported page size) will work.Reproduction
Expected Behavior
mmap
to map the file to the available page nearest tomain
Actual Behavior
mmap
fails, settingerrno
toENOMEM
Diagnostic Logs
Some information related to the Dart sdk issue can be found here, and traces of the repro provided above follow:
The text was updated successfully, but these errors were encountered: