It does not verify the case of having a umap library compiled with read/write mode being run on a platform supporting read-only access. This could happen quite easily if we build the umap library on one machine and then try to use it on a different machine with a standard kernel.
This verifies that if the umap library was compiled readonly, at runtime, the caller may not request PROT_WRITE.
This happens in the existing example/psort, which motivates to add the check at runtime
This is already checked in Uffd::check_uffd_compatibility (https://github.com/LLNL/umap/blob/969241d5bf18aa4126724b20b89dd92320d6ca8e/src/umap/Uffd.cpp#L316-L320) is already there to make the check (@mcfadden8 )