Rodrigo Kumpera [Wed, 6 Apr 2011 03:24:04 +0000 (00:24 -0300)]
Move thread management from sgen to utils. Move smr from MonoInternalThread to thread_info.
* mono-threads.c: An implementation of low level thread management that
fits what sgen needs. It uses hazard pointers to manage the thread list
since we can't protect it with the GC lock as this would cause boehm to
deadlock. This requires us to move small_id one layer down.
* Thread.cs:
* object-internals.h:
* threads.c: Small id is now stored on MonoThreadInfo so it can be
used by lower layers of the runtime such as sgen.
* sgen-major-copying.c:
* sgen-os-mach.c:
* sgen-os-posix.c:
* sgen-gc.h:
* sgen-gc.c: Replace sgen's thread management code with
the new one.
* boehm-gc.c: Hookup the new thread management code. Boehm's
own management code is not been replaced as I'm too much of
a coward to mess with it.
* hazard-pointer.c: Adjust to the new location of small_id.
Rodrigo Kumpera [Thu, 7 Apr 2011 20:00:18 +0000 (17:00 -0300)]
Add regression test.
Rodrigo Kumpera [Thu, 7 Apr 2011 19:42:40 +0000 (16:42 -0300)]
Handle constrained. with dynamic methods.
* loader.c (mono_get_method_constrained): Move the constrained
type resolution to get_method_constrained.
* loader.c: Add mono_get_method_constrained_with_method that
passes the unconstrained method instead of its token.
* method-to-ir.c (mono_method_to_ir): Use new function
to resolve constrained methods for dynamic methods.
Fixes #685908
Zoltan Varga [Thu, 7 Apr 2011 20:19:54 +0000 (22:19 +0200)]
Revert "Disable SMP on arm until #683409 is fixed."
This reverts commit
29550902eec1ab9dca1e64f51829b1032577748c.
This is now longer needed as #683409 is fixed.
Zoltan Varga [Thu, 7 Apr 2011 20:18:26 +0000 (22:18 +0200)]
Pass HAVE_ARMV6 to libgc on darwin too.
Zoltan Varga [Thu, 7 Apr 2011 20:14:32 +0000 (22:14 +0200)]
Add a membar to libgc's UNLOCK () on arm. Fixes #683409.
Atsushi Eno [Thu, 7 Apr 2011 15:19:40 +0000 (00:19 +0900)]
Split XmlMessagesFormatter out. It is for use in Sys.Xml.Serialization.dll.
XmlMessagesFormatter will be used in Sys.Xml.Serialization.dll and this
type should not be excluded by !NET_2_1 or !MOONLIGHT. It is not doable
if this class is in BaseMessagesFormatter.cs.
Atsushi Eno [Thu, 7 Apr 2011 15:11:15 +0000 (00:11 +0900)]
Add InternalsVisibleTo(Sys.Xml.Serialization.dll) to Sys.ServiceModel in 2.1.
Atsushi Eno [Thu, 7 Apr 2011 14:28:21 +0000 (23:28 +0900)]
Fix moonlight_raw build in Sys.Xml.Serialization.dll (NIE!)
Rodrigo Kumpera [Thu, 7 Apr 2011 13:33:43 +0000 (10:33 -0300)]
Fix a race condition on thread creation.
* wthreads.c (thread_start_routine): Set thread->id here
too since the new thread can start before it is set by
pthread_create.
Atsushi Eno [Thu, 7 Apr 2011 13:01:26 +0000 (22:01 +0900)]
DataContractSerializerOperationBehavior is done too. Fix moonlight_raw build.
Marek Safar [Thu, 7 Apr 2011 11:05:48 +0000 (12:05 +0100)]
[324961] Move type constraints checks into emit where it can be safely done (fixes many problems with complex constrains)
Atsushi Eno [Thu, 7 Apr 2011 10:19:07 +0000 (19:19 +0900)]
Some XmlSerializerFormatAttribute and XmlSerializerOperationBehavior refactoring.
Zoltan Varga [Thu, 7 Apr 2011 10:05:43 +0000 (12:05 +0200)]
Transition most JIT stats to the mono_counters infrastructure. Make the updates to the stats thread safe to reduce false positives when using thread debugging tools.
Marek Habersack [Mon, 4 Apr 2011 20:10:24 +0000 (22:10 +0200)]
[runtime] Linux support for statfs and improved drive detection
This introduces support for using statfs(2) on Linux as well as moves parsing of
drive information on Linux to the runtime. Three sources of information about drives
are supported: /proc/self/mountinfo, /proc/mounts and /etc/{mtab,mnttab}. The are
tried in the order given. Also, the code will include information about FUSE drives
with the exclusion of the GNOME gvfs (which is of no use to users).
Atsushi Eno [Thu, 7 Apr 2011 03:31:40 +0000 (12:31 +0900)]
HttpRequestChannel should also return CookieContainer in NET_2_1 profile.
Fixed bug #683642.
Gonzalo Paniagua Javier [Thu, 7 Apr 2011 02:59:46 +0000 (22:59 -0400)]
[HttpWebResponse] Close and Dispose are different beasts.
After calling Close () on response you are still allowed to access its
properties. Calling Dispose() causes the usual exception to be thrown
when accessing the properties.
Fixes bug #685368.
Zoltan Varga [Wed, 6 Apr 2011 23:29:49 +0000 (01:29 +0200)]
Disable SMP on arm until #683409 is fixed.
Zoltan Varga [Tue, 5 Apr 2011 20:34:23 +0000 (22:34 +0200)]
Avoid setting thread->id from the thread itself in io-layer, it is already set in the creator.
Zoltan Varga [Tue, 5 Apr 2011 20:33:53 +0000 (22:33 +0200)]
Add a write barrier before setting vtable->initalize to 1, since some places access it without a lock.
MrUnleaded [Wed, 6 Apr 2011 22:44:21 +0000 (18:44 -0400)]
Fix that corrects a mishandling of UInt64's.
Jb Evain [Wed, 6 Apr 2011 19:53:33 +0000 (21:53 +0200)]
linker: only read symbols if instructed to
Jb Evain [Wed, 6 Apr 2011 17:22:58 +0000 (19:22 +0200)]
linker: properly closee debug symbol readers
Jb Evain [Wed, 6 Apr 2011 17:15:53 +0000 (19:15 +0200)]
linker: add support for non default debug symbol format
Jb Evain [Wed, 6 Apr 2011 17:11:53 +0000 (19:11 +0200)]
linker: add per method preserve information
Jb Evain [Wed, 6 Apr 2011 17:08:45 +0000 (19:08 +0200)]
linker: Mark all generics instances' arguments
Sebastien Pouliot [Wed, 6 Apr 2011 17:24:31 +0000 (13:24 -0400)]
Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992
Chris Toshok [Wed, 6 Apr 2011 15:52:12 +0000 (08:52 -0700)]
add some #defines for methods moonlight uses
Sebastien Pouliot [Wed, 6 Apr 2011 15:21:31 +0000 (11:21 -0400)]
Move critical code from System.ServiceModel to mscorlib
* System.ServiceModel/System.ServiceModel/ClientBase.cs: Remove
reflection code that requires SSC inside S.SM.dll
* corlib/Mono/MoonlightHelper.cs: New helper, inside mscorlib.dll, to
replace the above code
* corlib/moonlight_raw_corlib.dll.sources: Add new helper to the build
Marek Safar [Wed, 6 Apr 2011 12:59:48 +0000 (13:59 +0100)]
Remove redundant accessibility checks
Marek Safar [Tue, 5 Apr 2011 17:40:12 +0000 (18:40 +0100)]
Allocate less temporary type expressions
Atsushi Eno [Wed, 6 Apr 2011 13:37:34 +0000 (22:37 +0900)]
once more: Remove obsolete nunit syntax from tests except for Assertion usage.
Atsushi Eno [Wed, 6 Apr 2011 13:02:58 +0000 (22:02 +0900)]
Looks like .NET accepts non-integer numbers as int. Smells bogus though.
Atsushi Eno [Wed, 6 Apr 2011 11:20:07 +0000 (20:20 +0900)]
auto-detect UTF16-LE too.
Atsushi Eno [Wed, 6 Apr 2011 11:14:40 +0000 (20:14 +0900)]
more: Remove obsolete nunit syntax from tests except for Assertion usage.
Atsushi Eno [Wed, 6 Apr 2011 11:01:27 +0000 (20:01 +0900)]
Remove obsolete nunit syntax from tests except for Assertion usage.
Jérémie Laval [Wed, 6 Apr 2011 09:40:14 +0000 (11:40 +0200)]
Don't forget to call Init in ConcurrentSkipList ctor.
Jérémie Laval [Wed, 6 Apr 2011 09:27:25 +0000 (11:27 +0200)]
Fix API changes in unit test (Mono.Parallel)
Marek Habersack [Wed, 6 Apr 2011 09:06:19 +0000 (11:06 +0200)]
[asp.net] CreateChildControls is internal only when compiling system.web tests
Marek Habersack [Wed, 6 Apr 2011 09:05:43 +0000 (11:05 +0200)]
[DynamicData] Use different web.config for 2.0 and 4.0 tests
Atsushi Eno [Wed, 6 Apr 2011 07:53:02 +0000 (16:53 +0900)]
Marked a couple of tests as NotDotNet as they blocked nunit completion on .NET.
Gonzalo Paniagua Javier [Wed, 6 Apr 2011 06:03:25 +0000 (02:03 -0400)]
[eglib] The last argument can be empty and quoted.
Fixes bug #669303.
Rodrigo Kumpera [Wed, 6 Apr 2011 03:37:51 +0000 (00:37 -0300)]
Zero rem as darwin returns a funny value when nanosleep is interrupted.
Rodrigo Kumpera [Wed, 6 Apr 2011 01:43:59 +0000 (22:43 -0300)]
Remove useless commented code
Rodrigo Kumpera [Wed, 6 Apr 2011 01:36:07 +0000 (22:36 -0300)]
Increase number of hazard pointer to 3. The linked list set requires it.
Rodrigo Kumpera [Wed, 6 Apr 2011 00:44:54 +0000 (21:44 -0300)]
Make the small_id_table a bitset.
* object-internals.h (MonoInternalThread): Use
unused5 to hold the conservative root to the thread itself.
* threads.c: MonoInternalThread objects have the peculiarity
that they must be pinned since we hold its value on TLS.
To solve it we register the field thread_pinning_ref as
a conservative root, causing them to be pinned.
* hazard-pointer.c: The small id allocation code no longer
depends on MonoInternalThread, change small_id_table to be
a bitset instead of an array of pointers.
Rodrigo Kumpera [Wed, 6 Apr 2011 00:44:51 +0000 (21:44 -0300)]
Fix warning on missing header
Rodrigo Kumpera [Wed, 6 Apr 2011 00:44:07 +0000 (21:44 -0300)]
Fix typo in documentation
Zoltan Varga [Tue, 5 Apr 2011 18:10:27 +0000 (20:10 +0200)]
Put back a check removed by mistake.
Zoltan Varga [Tue, 5 Apr 2011 18:09:22 +0000 (20:09 +0200)]
Enable LLVM compilation of runtime invoke wrappers.
Zoltan Varga [Tue, 5 Apr 2011 18:05:47 +0000 (20:05 +0200)]
Re-enable OP_SQRT support in llvm, the llvm bug which blocked it seems to be fixed.
Zoltan Varga [Tue, 5 Apr 2011 17:50:19 +0000 (19:50 +0200)]
Add llvm support for OP_RELAXED_NOP.
Zoltan Varga [Tue, 5 Apr 2011 16:53:09 +0000 (18:53 +0200)]
Add more vararg tests.
Atsushi Eno [Tue, 5 Apr 2011 14:05:43 +0000 (23:05 +0900)]
Fix build, looks like ArrayList is internally available in moon.
Jérémie Laval [Tue, 5 Apr 2011 13:23:24 +0000 (15:23 +0200)]
Protect entering ReaderWriterLockSlim upgradable mode against async exceptions.
Marek Habersack [Tue, 5 Apr 2011 12:34:17 +0000 (14:34 +0200)]
[asp.net] Fix for bug #684803. XmlSiteMapProvider must take its root node into account when matching an URL.
Atsushi Eno [Tue, 5 Apr 2011 11:55:32 +0000 (20:55 +0900)]
Collection support in JSON serializer was actually for any IEnumerable.
Marek Safar [Tue, 5 Apr 2011 11:34:05 +0000 (12:34 +0100)]
Don't eat escaped U characters
Atsushi Eno [Tue, 5 Apr 2011 11:26:09 +0000 (20:26 +0900)]
Revert PushbackReader changes (was unnecessary and actually bogus).
Marek Safar [Tue, 5 Apr 2011 10:07:51 +0000 (11:07 +0100)]
Fixes parsiong of coalescing operator on nullable type
Atsushi Eno [Tue, 5 Apr 2011 10:47:54 +0000 (19:47 +0900)]
null value also outputs "type='null' in WCF JSON writer.
Atsushi Eno [Tue, 5 Apr 2011 09:22:56 +0000 (18:22 +0900)]
Auto-detect text encoding from input stream for JsonReader. Fix DBCS pushback.
Marek Safar [Tue, 5 Apr 2011 08:37:12 +0000 (09:37 +0100)]
Rename lookup method for consistency
Marek Safar [Mon, 4 Apr 2011 18:19:27 +0000 (19:19 +0100)]
Speed up var expression type resolution
Marek Safar [Mon, 4 Apr 2011 16:01:53 +0000 (17:01 +0100)]
Clearly split namespace and type resolve paths
Marek Safar [Mon, 4 Apr 2011 13:54:59 +0000 (14:54 +0100)]
Warn about name collision between namespace and type
Atsushi Eno [Tue, 5 Apr 2011 04:19:54 +0000 (13:19 +0900)]
IDictionary`2 serialization support was missing in DataContractJsonSerializer.
Fixed bug #685042.
Rodrigo Kumpera [Tue, 5 Apr 2011 02:15:44 +0000 (23:15 -0300)]
Fix thinko
Rodrigo Kumpera [Tue, 5 Apr 2011 02:05:45 +0000 (23:05 -0300)]
Add implementation of a lock free linked list set.
* mono-linked-list-set.c: Implementation based
on M. Michael paper.
Jeffrey Stedfast [Mon, 4 Apr 2011 19:02:37 +0000 (15:02 -0400)]
Huge optimization to eglib qsort_with_data()
Sebastien Pouliot [Mon, 4 Apr 2011 15:32:05 +0000 (11:32 -0400)]
Avoid throwing an ANE on an invalid X.509 extension
* X509ExtensionCollection.cs: Avoid throwing an ArgumentNullException
when processing an invalid X.509 extension (e.g. where the value is not
encoded in an OCTETSTRING). See
E37A3466C703DCB14E6E16E416E51DC04A42A52B
in bnc #682619
Sebastien Pouliot [Mon, 4 Apr 2011 15:30:11 +0000 (11:30 -0400)]
Fix X.500 DN comparison
* X500DistinguishedName.cs: Fix DN comparison. See
D00FB2B40594C460D1D7F5E5A12F6654455D9247 and
D13835AF247D70C32E1032798939CFD32B2BFEA2 in bnc #682619
Sebastien Pouliot [Mon, 4 Apr 2011 15:15:29 +0000 (11:15 -0400)]
Add MD4, SHA384 and SHA512 signature verification to X.509 certificates
* X509Certificate.cs: Add MD4 (if available), SHA384 and SHA512
RSA signature verification
Atsushi Eno [Mon, 4 Apr 2011 13:55:30 +0000 (22:55 +0900)]
unlike told by docs.mono-android.net Trace does not exist in mobile profile.
Jb Evain [Mon, 4 Apr 2011 13:40:25 +0000 (15:40 +0200)]
Fix net_2_0 build
Sebastien Pouliot [Mon, 4 Apr 2011 12:23:19 +0000 (08:23 -0400)]
Allow comments (line starting with #) in the .secattr files
* InjectSecurityAttributes.cs: Allow comments in security attribute files
Sebastien Pouliot [Mon, 4 Apr 2011 12:20:50 +0000 (08:20 -0400)]
AppDomain.GetAssemblies() is available (it's internals) in Moonlight
* JsonSerializationReader.cs: Remove #if wrt MOONLIGHT since the API
is available (internal but Moonlight's mscorlib has an IVT on S.SM)
Marek Safar [Mon, 4 Apr 2011 12:31:11 +0000 (13:31 +0100)]
[684600] Treat all value types equally
Marek Safar [Mon, 4 Apr 2011 12:31:02 +0000 (13:31 +0100)]
Update comment
Atsushi Eno [Mon, 4 Apr 2011 11:57:12 +0000 (20:57 +0900)]
Add WCF diagnostics implementation (not working yet).
Marek Safar [Mon, 4 Apr 2011 10:18:28 +0000 (11:18 +0100)]
Pointer member access can use type arguments
Sebastien Pouliot [Sun, 3 Apr 2011 14:07:55 +0000 (10:07 -0400)]
Avoid throwing (just return false) when verifying an RSA certificate with dsaSHA1
* X509Certificate.cs: Do not throw a CryptographicException for "unknown
hash algorithm" when asked to verify a RSA certificate with dsaSHA1 since
this can happen when a bad/incomplete chain is being tested.
Zoltan Varga [Sun, 3 Apr 2011 06:04:06 +0000 (08:04 +0200)]
Fix warnings.
Kenneth Skovhede [Sun, 3 Apr 2011 03:56:14 +0000 (05:56 +0200)]
Fix the handling of the '%f' descriptor in DataConverter.Unpack (). Fixes #683712.
Marek Habersack [Sat, 2 Apr 2011 22:02:58 +0000 (00:02 +0200)]
[asp.net] 2.0 standalone tests must have the MONO_TESTS_IN_PROGRESS variable exported in the environment
Tomasz Kubacki [Sat, 2 Apr 2011 21:51:36 +0000 (23:51 +0200)]
[asp.net] HttpApplication.InitOnce must ensure that HttpApplication.Context does not return null.
HttpApplication.Context != null is assumed by System.Web.WebPages.WebPagesHttpModule Init method
Zoltan Varga [Sat, 2 Apr 2011 17:45:03 +0000 (19:45 +0200)]
Fix get-cygwin-deps.sh after sourceforge url changes.
Zoltan Varga [Sat, 2 Apr 2011 06:29:36 +0000 (08:29 +0200)]
Fix a harmless memory overwrite in sgen.
Atsushi Eno [Sat, 2 Apr 2011 02:28:19 +0000 (11:28 +0900)]
fix wrong attempt to add restricted headers in HttpRequestChannel.
Marek Habersack [Sat, 2 Apr 2011 00:36:53 +0000 (02:36 +0200)]
[asp.net] Store new heap size when shrinking it. Thanks to Rodrigo Kumpera for noticing it!
This should fix the IndexOutOfRangeError which occur after heap exceeds 8192 elements and is then
shrunk below that value.
Jeffrey Stedfast [Fri, 1 Apr 2011 20:39:05 +0000 (16:39 -0400)]
Minor fixes to qsort_with_data()
Rodrigo Kumpera [Fri, 1 Apr 2011 19:20:51 +0000 (16:20 -0300)]
More plat cleanups.
* sgen-gc.c (mono_sgen_wait_for_suspend_ack): Move the
mach check to the function itself. We later should push
it to plat specific code.
* sgen-gc.c (restart_threads_until_none_in_managed_allocator):
Move mach/posix resume code to plat specific files.
Rodrigo Kumpera [Fri, 1 Apr 2011 19:14:37 +0000 (16:14 -0300)]
Arch cleanup.
* sgen-gc.c: Remove one silly ifdef by implementing
mono_sgen_suspend_thread on posix.
Rodrigo Kumpera [Fri, 1 Apr 2011 19:10:56 +0000 (16:10 -0300)]
Fix thread restart under mach.
* sgen-gc.c (restart_threads_until_none_in_managed_allocator):
On mach we used to simply call thread_suspend/thread_resume
without updating the thread context, which would result in
sgen getting hang.
Rodrigo Kumpera [Fri, 1 Apr 2011 19:10:12 +0000 (16:10 -0300)]
Extract suspend code from mono_sgen_thread_handshake.
sgen-os-mach.c (mono_sgen_thread_handshake): Extract
suspend code into new function mono_sgen_suspend_thread.
Gonzalo Paniagua Javier [Fri, 1 Apr 2011 19:38:04 +0000 (15:38 -0400)]
[eglib] add missing declaration.
Atsushi Eno [Fri, 1 Apr 2011 19:10:09 +0000 (04:10 +0900)]
A bit less !NET_2_1 and !MOONLIGHT in Sys.ServiceModel.Web.
Jeffrey Stedfast [Fri, 1 Apr 2011 13:47:06 +0000 (09:47 -0400)]
Calculate proper stack size for qsort
Jeffrey Stedfast [Fri, 1 Apr 2011 12:11:11 +0000 (08:11 -0400)]
Implemented non-recursive qsort w/ insertion-sort fallback
Jeffrey Stedfast [Fri, 1 Apr 2011 11:45:43 +0000 (07:45 -0400)]
Soptimize qsort by re-ordering while-loop qualifiers