google / atheris

Apache License 2.0
1.35k stars 112 forks source link

MAP_ANONYMOUS not available on older MacOS #28

Closed bollwyvl closed 2 years ago

bollwyvl commented 2 years ago

Thanks for atheris, and congrats on the 2.0.8 release (and a tag on the repo pointed to it)!

It looks like the use of MAP_ANONYMOUS in counters.cc seems to raise the minimum supported OSX to 10.10. While this doesn't strictly bother me, downstream on conda-forge we generally try to keep the compatibility window as wide as possible. To get something out the door, this patch uses the apparently equivalent MAP_ANON and passes the simple smoke test from the repo, but we only apply it on OSX.

I guess it would be good to either:

Thanks again!

TheShiftedBit commented 2 years ago

Fix incoming today. CPython has to do the same thing: https://github.com/python/cpython/blob/main/Modules/mmapmodule.c#L84

bollwyvl commented 2 years ago

Thanks!

TheShiftedBit commented 2 years ago

Updated. Give it a try and check if it works.

bollwyvl commented 2 years ago

Yes indeed, works as advertised! The quick response is much appreciated.