Skip to content
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

ReflectionModelServices.IsExportFactoryImportDefinition should not throw #12461

Closed
KirillOsenkov opened this issue Jan 17, 2019 · 1 comment

Comments

@KirillOsenkov
Copy link
Member

@KirillOsenkov KirillOsenkov commented Jan 17, 2019

After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw:

        public static bool IsExportFactoryImportDefinition(ImportDefinition importDefinition)
        {
            Requires.NotNull(importDefinition, "importDefinition");

            return (importDefinition is IPartCreatorImportDefinition);
        }

We still seem to have a snapshot of that code that throws:

if (reflectionImportDefinition == null)
{
throw new ArgumentException(
string.Format(CultureInfo.CurrentCulture, Strings.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()),
"importDefinition");
}

It would be nice to update that to match the latest .NET Framework sources.

This is blocking VSMEF here:
https://github.com/Microsoft/vs-mef/blob/9eb8e1d42918ad8d4a422f2dd005df0f96089599/src/Microsoft.VisualStudio.Composition/Configuration/NetFxAdapters.cs#L158-L161

@KirillOsenkov

This comment has been minimized.

Copy link
Member Author

@KirillOsenkov KirillOsenkov commented Jan 17, 2019

Details for the .NET Framework change are here:
vstfdevdiv changeset: 1389163, work item: 1005218

@marek-safar marek-safar added this to the 2018-10 (5.20.xx) milestone Jan 17, 2019
monojenkins added a commit to monojenkins/mono that referenced this issue Jan 17, 2019
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
monojenkins added a commit to monojenkins/mono that referenced this issue Jan 17, 2019
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
marek-safar added a commit that referenced this issue Jan 17, 2019
Fix #12461.
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
marek-safar added a commit that referenced this issue Jan 17, 2019
Fix #12461.
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
marek-safar added a commit that referenced this issue Jan 17, 2019
Fix #12461.
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
monojenkins added a commit to monojenkins/mono that referenced this issue Jan 17, 2019
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
marek-safar added a commit that referenced this issue Jan 17, 2019
Fix #12461.
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw.

Updating this to match the .NET Framework behavior.
chamons added a commit to chamons/xamarin-macios that referenced this issue Jan 17, 2019
Commit list for mono/mono:

* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx
* mono/mono@51c4f45 [2018-08] [merp] Batch of fixes (#12095)
* mono/mono@3bf3705 [interp] use interp_lmf wrapper for interp2native on platforms with wonky sigcontext (#12348)
* mono/mono@25a8be9 Bump CoreFX to bring a fix for #12093
* mono/mono@29e0e64 [Android] Fix build with NDK r18 (#11016) (#12291)
* mono/mono@7b44d57 [tests] Remove an invalid assertion on System.IO.DriveInfo
* mono/mono@3fad9a7 Update DateTimeTest.cs
* mono/mono@6b6fd89 Update mono/metadata/culture-info-tables.h
* mono/mono@8f50f96 Add tests
* mono/mono@1edf795 ko-* specific AM/PM designators

Diff: mono/mono@9671417...725ba2a
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue Jan 17, 2019
Fixes: mono/mono#12307
Fixes: mono/mono#12461

Bumps to dotnet/corefx@8d1b6ab.
Bumps to mono/api-snapshot@9fb4259.

Fix debugger crash.

Support dumping AOT offsets with Android NDK r17+.
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Jan 18, 2019
Fixes: mono/mono#12307
Fixes: mono/mono#12461

Bumps to dotnet/corefx@8d1b6ab.
Bumps to mono/api-snapshot@9fb4259.

Fix debugger crash.

Support dumping AOT offsets with Android NDK r17+.
chamons added a commit to xamarin/xamarin-macios that referenced this issue Jan 18, 2019
Commit list for mono/mono:

* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx
* mono/mono@51c4f45 [2018-08] [merp] Batch of fixes (#12095)
* mono/mono@3bf3705 [interp] use interp_lmf wrapper for interp2native on platforms with wonky sigcontext (#12348)
* mono/mono@25a8be9 Bump CoreFX to bring a fix for #12093
* mono/mono@29e0e64 [Android] Fix build with NDK r18 (#11016) (#12291)
* mono/mono@7b44d57 [tests] Remove an invalid assertion on System.IO.DriveInfo
* mono/mono@3fad9a7 Update DateTimeTest.cs
* mono/mono@6b6fd89 Update mono/metadata/culture-info-tables.h
* mono/mono@8f50f96 Add tests
* mono/mono@1edf795 ko-* specific AM/PM designators

Diff: mono/mono@9671417...725ba2a
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Jan 18, 2019
Fixes: mono/mono#12307
Fixes: mono/mono#12461

Bumps to dotnet/corefx@8d1b6ab.
Bumps to mono/api-snapshot@9fb4259.

Fix debugger crash.

Support dumping AOT offsets with Android NDK r17+.
lewurm added a commit to lewurm/xamarin-macios that referenced this issue Jan 21, 2019
Commit list for mono/mono:

* mono/mono@1be343e [runtime] Don't try (slow) dlopen on android if it doesn't exist (#12513)
* mono/mono@c6a7260 [2018-10] [ios] enable llvm for watch64_32 runtime (#12498)
* mono/mono@0582cf8 [runtime] Don't probe aot cache on android
* mono/mono@3d6efcb [2018-10 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12466)
* mono/mono@513707c Fix mono/mono#12461.

Diff: mono/mono@aca7189...1be343e
lewurm added a commit to lewurm/xamarin-macios that referenced this issue Jan 23, 2019
Commit list for mono/mono:

* mono/mono@b6c818b [arm64_32] use emulate OPs so it works with bitcode compiled code for armv7k (#12443)
* mono/mono@204f917 [sdks] Add a XCODE32_DIR make variable and use it to compile the 32 bit cross compilers. (#12055)
* mono/mono@70a207a [ios] initial watch64_32 support (#11691)
* mono/mono@287b559 [mini] rename s/__mono_ilp32__/MONO_ARCH_ILP32 (#11652)
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...b6c818b
spouliot pushed a commit to spouliot/xamarin-macios that referenced this issue Jan 30, 2019
Commit list for mono/mono:

* mono/mono@2359cba [coop] Fix deadlock when unwinding
* mono/mono@a4956c8 [2018-08] Native Crash Stability Fix Batch (#12565)
* mono/mono@d4d4fb7 [eglib]Fix memory leak in `g_find_program_in_path()`. #11615.
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...2359cba
spouliot added a commit to xamarin/xamarin-macios that referenced this issue Jan 30, 2019
Commit list for mono/mono:

* mono/mono@2359cba [coop] Fix deadlock when unwinding
* mono/mono@a4956c8 [2018-08] Native Crash Stability Fix Batch (#12565)
* mono/mono@d4d4fb7 [eglib]Fix memory leak in `g_find_program_in_path()`. #11615.
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...2359cba
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Feb 4, 2019
Commit list for mono/mono:

* mono/mono@b6c818b [arm64_32] use emulate OPs so it works with bitcode compiled code for armv7k (#12443)
* mono/mono@204f917 [sdks] Add a XCODE32_DIR make variable and use it to compile the 32 bit cross compilers. (#12055)
* mono/mono@70a207a [ios] initial watch64_32 support (#11691)
* mono/mono@287b559 [mini] rename s/__mono_ilp32__/MONO_ARCH_ILP32 (#11652)
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...b6c818b
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Feb 7, 2019
Commit list for mono/mono:

* mono/mono@b6c818b [arm64_32] use emulate OPs so it works with bitcode compiled code for armv7k (#12443)
* mono/mono@204f917 [sdks] Add a XCODE32_DIR make variable and use it to compile the 32 bit cross compilers. (#12055)
* mono/mono@70a207a [ios] initial watch64_32 support (#11691)
* mono/mono@287b559 [mini] rename s/__mono_ilp32__/MONO_ARCH_ILP32 (#11652)
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...b6c818b
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Feb 7, 2019
Commit list for mono/mono:

* mono/mono@b6c818b [arm64_32] use emulate OPs so it works with bitcode compiled code for armv7k (#12443)
* mono/mono@204f917 [sdks] Add a XCODE32_DIR make variable and use it to compile the 32 bit cross compilers. (#12055)
* mono/mono@70a207a [ios] initial watch64_32 support (#11691)
* mono/mono@287b559 [mini] rename s/__mono_ilp32__/MONO_ARCH_ILP32 (#11652)
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...b6c818b
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Feb 12, 2019
Commit list for mono/mono:

* mono/mono@b6c818b [arm64_32] use emulate OPs so it works with bitcode compiled code for armv7k (#12443)
* mono/mono@204f917 [sdks] Add a XCODE32_DIR make variable and use it to compile the 32 bit cross compilers. (#12055)
* mono/mono@70a207a [ios] initial watch64_32 support (#11691)
* mono/mono@287b559 [mini] rename s/__mono_ilp32__/MONO_ARCH_ILP32 (#11652)
* mono/mono@9939c1a [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a Fix mono/mono#12461.
* mono/mono@1dee626 [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c819 [x86] Set the LLVM data layout.
* mono/mono@5d3077c [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc Bump API snapshot submodule
* mono/mono@e6285d0 Bump corefx

Diff: mono/mono@51c4f45...b6c818b
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Apr 24, 2019
Bumps to mono/api-snapshot@ae01378
Bumps to mono/reference-assemblies@e5173a5
Bumps to mono/bockbuild@d30329d
Bumps to mono/boringssl@3d87996
Bumps to mono/corefx@72f7d76
Bumps to mono/corert@1b7d4a1
Bumps to mono/helix-binaries@7e893ea
Bumps to mono/illinker-test-assets@f21ff68
Bumps to mono/linker@13d864e
Bumps to mono/llvm@1aaaaa5 [mono]
Bumps to mono/llvm@2c2cffe [xamarin-android]
Bumps to mono/NUnitLite@0029561
Bumps to mono/roslyn-binaries@0bbc9b4
Bumps to mono/xunit-binaries@8f6e62e

	$ git diff --shortstat 886c4901..e66c7667      # mono
        3597 files changed, 350850 insertions(+), 91128 deletions(-)
	$ git diff --shortstat 349752c464c5fc93b32e7d45825f2890c85c8b7d..2c2cffedf01e0fe266b9aaad2c2563e05b750ff4
	 240 files changed, 18562 insertions(+), 6581 deletions(-)

Context: dotnet/coreclr#22046

Fixes: CVE 2018-8292 on macOS
Fixes: http://work.devdiv.io/737323
Fixes: dotnet/corefx#33965
Fixes: dotnet/standard#642
Fixes: mono/mono#6997
Fixes: mono/mono#7326
Fixes: mono/mono#7517
Fixes: mono/mono#7750
Fixes: mono/mono#7859
Fixes: mono/mono#8360
Fixes: mono/mono#8460
Fixes: mono/mono#8766
Fixes: mono/mono#8922
Fixes: mono/mono#9418
Fixes: mono/mono#9507
Fixes: mono/mono#9951
Fixes: mono/mono#10024
Fixes: mono/mono#10030
Fixes: mono/mono#10038
Fixes: mono/mono#10448
Fixes: mono/mono#10735
Fixes: mono/mono#10735
Fixes: mono/mono#10737
Fixes: mono/mono#10743
Fixes: mono/mono#10834
Fixes: mono/mono#10837
Fixes: mono/mono#10838
Fixes: mono/mono#10863
Fixes: mono/mono#10945
Fixes: mono/mono#11020
Fixes: mono/mono#11021
Fixes: mono/mono#11021
Fixes: mono/mono#11049
Fixes: mono/mono#11091
Fixes: mono/mono#11095
Fixes: mono/mono#11123
Fixes: mono/mono#11138
Fixes: mono/mono#11146
Fixes: mono/mono#11202
Fixes: mono/mono#11214
Fixes: mono/mono#11317
Fixes: mono/mono#11326
Fixes: mono/mono#11378
Fixes: mono/mono#11385
Fixes: mono/mono#11478
Fixes: mono/mono#11479
Fixes: mono/mono#11488
Fixes: mono/mono#11489
Fixes: mono/mono#11527
Fixes: mono/mono#11529
Fixes: mono/mono#11596
Fixes: mono/mono#11603
Fixes: mono/mono#11613
Fixes: mono/mono#11623
Fixes: mono/mono#11663
Fixes: mono/mono#11681
Fixes: mono/mono#11684
Fixes: mono/mono#11693
Fixes: mono/mono#11697
Fixes: mono/mono#11779
Fixes: mono/mono#11809
Fixes: mono/mono#11858
Fixes: mono/mono#11895
Fixes: mono/mono#11898
Fixes: mono/mono#11898
Fixes: mono/mono#11965
Fixes: mono/mono#12182
Fixes: mono/mono#12193
Fixes: mono/mono#12218
Fixes: mono/mono#12235
Fixes: mono/mono#12263
Fixes: mono/mono#12307
Fixes: mono/mono#12331
Fixes: mono/mono#12362
Fixes: mono/mono#12374
Fixes: mono/mono#12402
Fixes: mono/mono#12421
Fixes: mono/mono#12461
Fixes: mono/mono#12479
Fixes: mono/mono#12479
Fixes: mono/mono#12552
Fixes: mono/mono#12603
Fixes: mono/mono#12747
Fixes: mono/mono#12831
Fixes: mono/mono#12843
Fixes: mono/mono#12881
Fixes: mono/mono#13030
Fixes: mono/mono#13284
Fixes: mono/mono#13297
Fixes: mono/mono#13455
Fixes: mono/mono#13460
Fixes: mono/mono#13478
Fixes: mono/mono#13479
Fixes: mono/mono#13522
Fixes: mono/mono#13607
Fixes: mono/mono#13610
Fixes: mono/mono#13610
Fixes: mono/mono#13639
Fixes: mono/mono#13672
Fixes: mono/mono#13834
Fixes: mono/mono#13878
Fixes: mono/mono#6352
Fixes: mono/monodevelop#6898
Fixes: xamarin/maccore#1069
Fixes: xamarin/maccore#1407
Fixes: xamarin/maccore#604
Fixes: xamarin/xamarin-macios#4984
Fixes: xamarin/xamarin-macios#5289
Fixes: xamarin/xamarin-macios#5363
Fixes: xamarin/xamarin-macios#5381
Fixes: https://issuetracker.unity3d.com/issues/editor-crashes-with-g-logv-when-entering-play-mode-with-active-flowcanvas-script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.