Emergency backport to fix #29667
This commit is contained in:
parent
c83ed03657
commit
7c85b9f66b
@ -0,0 +1,38 @@
|
|||||||
|
From ffb5c90e08d2f619b207c07c25b8551f52e9913e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Safar <marek.safar@gmail.com>
|
||||||
|
Date: Sat, 9 May 2015 12:24:20 +0200
|
||||||
|
Subject: [PATCH] [system.runtime.caching] Remove inappropropriate use of
|
||||||
|
Marshal.SizeOf. Fixes #29667
|
||||||
|
|
||||||
|
---
|
||||||
|
mcs/class/System.Runtime.Caching/ReferenceSources/SRef.cs | 9 ++++++---
|
||||||
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mcs/class/System.Runtime.Caching/ReferenceSources/SRef.cs b/mcs/class/System.Runtime.Caching/ReferenceSources/SRef.cs
|
||||||
|
index ce0812b..644a2fc 100644
|
||||||
|
--- a/mcs/class/System.Runtime.Caching/ReferenceSources/SRef.cs
|
||||||
|
+++ b/mcs/class/System.Runtime.Caching/ReferenceSources/SRef.cs
|
||||||
|
@@ -11,14 +11,17 @@ namespace System.Runtime.Caching {
|
||||||
|
*/
|
||||||
|
internal class SRef {
|
||||||
|
|
||||||
|
- private Object _sizedRef;
|
||||||
|
+// private Object _sizedRef;
|
||||||
|
|
||||||
|
internal SRef (Object target) {
|
||||||
|
- _sizedRef = target;
|
||||||
|
+// _sizedRef = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal long ApproximateSize {
|
||||||
|
- get { return (long) Marshal.SizeOf (_sizedRef.GetType ()); }
|
||||||
|
+ get {
|
||||||
|
+ // TODO: .net uses System.SizedReference which contains approximate size after Gen 2 collection
|
||||||
|
+ return 16;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Dispose() {
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -28,13 +28,14 @@
|
|||||||
|
|
||||||
Name: mono-core
|
Name: mono-core
|
||||||
Version: 4.0.1
|
Version: 4.0.1
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: Cross-platform, Open Source, .NET development framework
|
Summary: Cross-platform, Open Source, .NET development framework
|
||||||
License: LGPL-2.1 and MIT and MS-PL
|
License: LGPL-2.1 and MIT and MS-PL
|
||||||
Group: Development/Languages/Mono
|
Group: Development/Languages/Mono
|
||||||
Url: http://www.mono-project.com
|
Url: http://www.mono-project.com
|
||||||
Source0: http://download.mono-project.com/sources/mono/mono-%{version}.tar.bz2
|
Source0: http://download.mono-project.com/sources/mono/mono-%{version}.tar.bz2
|
||||||
Patch0: import-amd64-tramp-size.patch
|
Patch0: import-amd64-tramp-size.patch
|
||||||
|
Patch1: 0001-system.runtime.caching-Remove-inappropropriate-use-o.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
@ -119,6 +120,7 @@ technologies that have been submitted to the ECMA for standardization.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n mono-%{version}
|
%setup -q -n mono-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user