Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
We need to flush instruction cache only for pages that have relocations
instead of full sections because otherwise application's shared clean
memory is increased in some cases on Linux.
|
|
It fixes crashes on arm when using AOT images.
|
|
* Fix unloading of images mapped by PAL
The m_FileView member of MappedImageLayout is a CLRMapViewHolder,
which runs CLRUnmapViewOfFile on release. This is fine on Windows,
where the MappedImageLayout constructor calls
CLRMapViewOfFile. However, with FEATURE_PAL, the constructor calls
PAL_LOADLoadPEFile, which simulates LoadLibrary and records multiple
mapping entries. Each entry increases the refcount of the underlying
file handle PAL object. PAL_LOADUnloadPEFile should be called in this
case (instead of CLRUnmapViewOfFile), to decrease the refcount for
each mapping entry.
Fixes https://github.com/dotnet/coreclr/issues/15189.
* Fix build failure
|
|
|
|
Unnecessary dummy type on CoreCLR
|
|
* Fix zap and ready to run disabling
While the COMPlus_ZapDisable and COMPlus_ReadyToRun config settings
can be used to disable using crossgened / ready to run images, loading
IL from such images fails.
This change foxes that.
* Reflect PR feedback
Remove ReadyToRunInfo::IsReadyToRunEnabled from Module::Initialize again
and move the same check in the ReadyToRunInfo::Initialize before we
start checking the PE file properties.
|
|
This change removes executable memory mappings from crossgen. Now it
can be run on systems with PAX set to prevent executable mappings
without any marking using the paxctl.
|
|
* [Arm64/Unix] Support 64K pages
* GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
|
|
|
|
* Remove PAL FileAlignment restriction
* Address PR #10959 feedback
* Fix amd64 crossgen error
* Respond to review feedback
* Fix arm32 regression
* Prepare to remove VIRTUAL_PAGE_* from map.cpp
Also simplify previous section code
* Rename function to GetVirtualPageSize()
|
|
|
|
|
|
|
|
Fixing the loader logic on Unix to mimic the behavior on Windows,
in order to be able to successfully load and use R2R images on
Unix where the file extension does not have the ".ni." portion.
|
|
This change fixes a problem that prevents us to load crossgen-ed managed
assemblies on SELinux when running in confined mode.
The problem was that when we load these images, we also apply relocations
to their sections and so we temporarily switch section protection from
RX to RW and then back. And the switching back (RW -> RX) is something
that SELinux doesn't allow.
The fix is to switch to RWX before applying to relocations for sections
that are RX, since it is allowed then to switch them back to RX.
One more change was needed to get the original protection of the section
before relocation so that we can set it back later. The PE files are
not mapped using VirtualXXXX functions in the PAL and so VirtualProtect
doesn't return the proper original protection, but a fixed value instead.
So for PAL, we derive the original protection from the section attributes.
|
|
- Delete BINDER, STANDALONE_BINDER and MDIL ifdefs
|
|
They are:
1. Wrappers for OS APIs which take or return PATHS
2. Fixing the usage of following Api's:
GetEnvironmentVariableW
SearchPathW
GetShortPathNameW
GetLongPathNameW
GetModuleFileName
Work remaining:
Remove fixed size buffers in the VM
|
|
While making the ready to run tests run on Unix, I have discovered that the feature
doesn't really work on Unix. First, I have found that the test was generating the
native images into the NI subfolder, but the corerun on Unix doesn't use this
notation and expects these images to live side by side with the IL executables.
So, the test to verify that an image cannot be loaded multiple times was failing,
since the main exe loaded the IL test.dll instead of the native one and so explicit
load of the native test.dll wasn't considered a secondary load of the same image.
After fixing the test, I have found that attempt to load a ready to run image is
failing with an assert.
There were these issues:
- the loaded native image was not marked as relocated
- the EPILOG_WITH_TRANSITION_BLOCK_RETURN macro was missing popping argument registers
- One of the asserts and one getter didn't take into account the fact that the ready to
run native image is not considered to have native header.
- The assembler helpers DelayLoad_Helper and DelayLoad_MethodCall were passing a hex
number as a parameter to the PROLOG_WITH_TRANSITION_BLOCK, but it was using the "h"
suffix notation. There is a known issue in the clang assembler which causes such
suffix to be swallowed so the macro was getting just "10" instead of "10h". The fix
was to use 0x prefix instead.
This change fixes the problem. The ready to run tests pass with it correctly.
|
|
|
|
|
|
[tfs-changeset: 1407945]
|