Closed acfoltzer closed 4 years ago
This PR now also enables the uffd
feature by default, but filters on OS.
Notably, this should get us building and running uffd in Linux CI.
It turns out to be a tremendous pain to enable a feature flag for just one crate within a workspace. The situation is being addressed, but in the meantime I believe the best route forward is to just have uffd on by default for Linux.
Okay, the CI issue is still outstanding, but I'm happy with merging this into your branch, @tyler
This first commit enables alloc tests for
UffdRegion
, adds a new test, and fixes some things:Instantiates the suite in
lucet_runtime_internals::alloc::tests
forUffdRegion
Fixes early return issues in
UffdRegion
similar to #455Adds a test to show that the per-instance heap limit applies to runtime expansions, not just initial instantiation
Refactors
validate_runtime_spec
to take the per-instance heap limit as an additional argument. This centralizes the logic for rejecting initially-oversized heap limits, and makes it clearer what's happening in each region's instantiation logic.Removes the
UffdRegion
's assertion that signal stack size is a multiple of page size. Since the user can now control this as a parameter, we reject it gracefully when validatingLimits
rather than panicking.