mono.git
7 years ago[msvc] Update csproj files (#4226)
monojenkins [Wed, 11 Jan 2017 18:35:12 +0000 (19:35 +0100)]
[msvc] Update csproj files (#4226)

7 years agoMerge pull request #4224 from akoeplinger/fix-46602
Alexander Köplinger [Wed, 11 Jan 2017 18:32:38 +0000 (19:32 +0100)]
Merge pull request #4224 from akoeplinger/fix-46602

[btls] Create a native BTLS key handle for X509CertificateImplBtls.PrivateKey

7 years agoLldb support code for mono (#4225)
Zoltan Varga [Wed, 11 Jan 2017 17:12:32 +0000 (12:12 -0500)]
Lldb support code for mono (#4225)

* Initial version of lldb support code.

* [lldb] Keep all the debug entries in a linked list so lldb can read it after attaching to the process.

* [lldb] Add an --enable-minimal=lldb option to disable the code. Add locking.

* [lldb] Add support for dynamic methods by adding a new protocol entry for unloading code regions.

* [lldb] Add beginnings of a test suite using the lldb python bindings.

* [lldb] Emit line number info for methods, not used yet.

* [lldb] Add dummy fields to structures to make sure 64 bit fields are 64 bit aligned.

* [lldb] Finish emission of line number info.

* [lldb] Use mono_method_full_name () for computing method names.

* [lldb] Emit info for specific trampolines as well.

* [lldb] Add tests for line number info.

* [lldb] Fix unwind info encoding on x86.

* [lldb] Skip seq points with no native offset.

* [lldb] Add tests for breakpoints.

7 years ago[remoting] Coop handles for proxy objects (#4208)
Aleksey Kliger (λgeek) [Wed, 11 Jan 2017 15:38:49 +0000 (10:38 -0500)]
[remoting] Coop handles for proxy objects (#4208)

* [remoting] Use coop handles in several functions

  - icall System.Runtime.Remoting.Proxies.RealProxy.InternalGetTransparentProxy
  - mono_remote_class
  - mono_remote_class_vtable
  - mono_upgrade_remote_class
  - mono_object_handle_get_virtual_method
  - mono_object_handle_isinst
  - mono_object_handle_isinst_mbyref

* [reflection] Use handles in System.RuntimeTypeHandle.IsInstanceOfType

* [runtime] Rewrite mono_object_castclass_mbyref
  in terms of mono_object_handle_isinst_mbyref.

  This is an external API function that isn't used inside the runtime.

* [runtime] Remove mono_object_isinst_mbyref_checked

  It was a runtime internal funciton.

  All of its former callers have been converted to use mono_object_handle_isinst_mbyref.

7 years agoMerge pull request #4219 from marek-safar/corert-bump
Marek Safar [Wed, 11 Jan 2017 13:32:31 +0000 (14:32 +0100)]
Merge pull request #4219 from marek-safar/corert-bump

Update ValueTuple implementation

7 years ago[corlib] Update ValueTuple implementation
Marek Safar [Tue, 10 Jan 2017 14:08:21 +0000 (15:08 +0100)]
[corlib] Update ValueTuple implementation

7 years agoBump corert
Marek Safar [Mon, 9 Jan 2017 16:50:21 +0000 (17:50 +0100)]
Bump corert

7 years ago[jit] Extends an array in mono_spill_global_vars () instead of asserting. Fixes ...
Zoltan Varga [Wed, 11 Jan 2017 09:31:21 +0000 (04:31 -0500)]
[jit] Extends an array in mono_spill_global_vars () instead of asserting. Fixes #50789. (#4201)

7 years agoMerge pull request #4222 from alexanderkyte/fix_mismatch_com_disabled
Marek Safar [Wed, 11 Jan 2017 08:44:17 +0000 (09:44 +0100)]
Merge pull request #4222 from alexanderkyte/fix_mismatch_com_disabled

[runtime] Fix corlib out of date error with disabled COM

7 years agoMono BCL test fixes so XM can run them (#4210)
Chris Hamons [Tue, 10 Jan 2017 22:59:08 +0000 (16:59 -0600)]
Mono BCL test fixes so XM can run them (#4210)

7 years ago[btls] Create a native BTLS key handle for X509CertificateImplBtls.PrivateKey
Alexander Köplinger [Tue, 10 Jan 2017 20:40:58 +0000 (21:40 +0100)]
[btls] Create a native BTLS key handle for X509CertificateImplBtls.PrivateKey

When setting X509CertificateImplBtls.PrivateKey we'd previously just
update the fallback instance. This causes problems if other code
internal to System.dll like MonoBtlsContext.SetPrivateCertificate()
tries to fetch the NativePrivateKey since it'd be null at that point.

This scenario happens e.g. with HttpListener, it supports a special
directory in ~/.config/.mono/httplistener which contains <port>.cer
and <port>.pvk files (public and private key) that will be used
as the server certificate. In that code we're reading the private
key from the file and assigning it to X509CertificateImplBtls.PrivateKey
without ever having a native BTLS handle.

The fix is to create such a native BTLS handle from the managed
private key when needed.

Note that we can't simply always do this e.g. in the PrivateKey
setter because the setter will be used with instances that
don't actually contain a private key. We can't throw in those
cases so instead we do it only when NativePrivateKey is accessed.

To make the code clearer and easier to read, `privateKey` was
renamed to `nativePrivateKey` in X509CertificateImplBtls.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=46602

7 years ago[btls] Call Reset() in X509CertificateImplBtls.Import()
Alexander Köplinger [Tue, 10 Jan 2017 20:37:30 +0000 (21:37 +0100)]
[btls] Call Reset() in X509CertificateImplBtls.Import()

Otherwise we'd not clear the fields like subjectName, issuerName, etc.
and the properties they're backing would continue to return old values.

7 years ago[btls] Free handle returned by EVP_PKEY_get1_RSA
Alexander Köplinger [Tue, 10 Jan 2017 21:14:47 +0000 (22:14 +0100)]
[btls] Free handle returned by EVP_PKEY_get1_RSA

From the header docs:

> The |get1| functions return a fresh reference to the underlying
> object or NULL if |pkey| is not of the correct type.

7 years ago[System] Use non-obsolete API in SslStream
Alexander Köplinger [Tue, 10 Jan 2017 20:44:29 +0000 (21:44 +0100)]
[System] Use non-obsolete API in SslStream

7 years ago[msvc] Update csproj files (#4221)
monojenkins [Tue, 10 Jan 2017 18:33:39 +0000 (19:33 +0100)]
[msvc] Update csproj files (#4221)

7 years ago[runtime] Fix corlib out of date error with disabled COM
Alexander Kyte [Tue, 10 Jan 2017 18:25:10 +0000 (18:25 +0000)]
[runtime] Fix corlib out of date error with disabled COM

7 years ago[bcl] Remove System.Activities.Presentation folder from referencesource
Alexander Köplinger [Tue, 10 Jan 2017 15:29:59 +0000 (16:29 +0100)]
[bcl] Remove System.Activities.Presentation folder from referencesource

We won't import it into Mono anytime soon and the long paths
cause issues when checking out Mono on Windows.

7 years ago[reflection] Coop handles icalls in System.Reflection and System.RuntimeTypeHandle...
Aleksey Kliger (λgeek) [Tue, 10 Jan 2017 15:22:14 +0000 (10:22 -0500)]
[reflection] Coop handles icalls in System.Reflection and System.RuntimeTypeHandle (#4217)

* [sre] Add typed coop handle declarations

* [reflection] Implement mono_reflection_get_token_handle

  Rewrite mono_reflection_get_token_checked to use it.

* [reflection] Use handles for ves_icall_reflection_get_token

  - Get rid of mono_reflection_get_token_checked
  - Rename mono_reflection_get_token_handle to mono_reflection_get_token_checked

* [reflection] Use handles for ves_icall_GetCurrentMethod

* [reflection] Use handles for ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType_native

* [reflection] Use handles for ves_icall_System_Reflection_Module_ResolveSignature

* [reflection] Use handles for ves_icall_System_Type_internal_from_name

* [reflection] Use handles for ves_icall_System_Type_internal_from_handle

* [runtime] Use coop handles for System.Object.GetType ()

* [reflection] Use handles for ves_icall_MonoField_GetParentType

* [reflection] Use handles for ves_icall_MonoField_ResolveType

* [reflection] Use handles for most icalls in System.RuntimeTypeHandle

  - GetArrayRank
  - GetAttributes
  - GetBaseType
  - GetElementType
  - HasInstantiation
  - IsArray
  - IsByRef
  - IsComObject
  - IsGenericTypeDefinition
  - IsGenericVariable
  - IsPointer
  - IsPrimitive
  - type_is_assignable_from

* [reflection] Use handles for ves_icall_RuntimeTypeHandle_GetGenericTypeDefinition_impl

  and ves_icall_RuntimeTypeHandle_GetGenericParameterInfo

7 years ago[runtime] Set the pinvoke bit for handles-using icall callsites.
Aleksey Kliger [Mon, 9 Jan 2017 20:48:10 +0000 (15:48 -0500)]
[runtime] Set the pinvoke bit for handles-using icall callsites.

The MonoMethodSignature:pinvoke bit causes the IR translation to clear the
upper bits of return values that are smaller than a register. (See
mono_emit_widen_call_res)

Without this change, any icall returning a boolean (8 bits on .NET) might have
non-zero upper bits which will cause branches to misbehave.

7 years ago[build] Add WIN_PLATFORM define
Marek Safar [Tue, 10 Jan 2017 10:13:17 +0000 (11:13 +0100)]
[build] Add WIN_PLATFORM define

7 years agoRevert "[configure] avoid 'no symbols' warnings on darwin"
Zoltan Varga [Mon, 9 Jan 2017 23:15:41 +0000 (18:15 -0500)]
Revert "[configure] avoid 'no symbols' warnings on darwin"

This reverts commit c1f39f3cb4bb853bb42051f08fcd1aad980f2ea9.

Reverted this to get CI back.

7 years ago[aot] Rewrite the AOT profiler. (#4176)
Zoltan Varga [Mon, 9 Jan 2017 22:37:57 +0000 (17:37 -0500)]
[aot] Rewrite the AOT profiler. (#4176)

* [aot] Rewrite the AOT profiler.

The AOT profiler is used to collect the methods/instances used at runtime.
Usage:
* mono --profile=aot:output=out.aotprof <app>
* mono --aot=profile=out.aotprof <assembly>

The first command will run <app>, collecting the list of methods it uses into the out.aotprof file.
The second command passes the profile file to the AOT compiler to have it generate additional generic instances.

* [docs] Add a section for AOT profiling to the mono(1) man page.

* [build] Collect AOT profile info from building mscorlib in the build profile, and use it when aot-ing the csc assemblies.

* [runtime] Add missing mono-profiler-aot.h file.

* [runtime] Tidy up usage of MONO_PROFILER_API.

* [aot] Improve error handling in the aot profiler.

* [aot] Improve error handling, add more diagnostics.

7 years ago[btls] Capture inner exception in MobileAuthenticatedStream
Alexander Köplinger [Mon, 9 Jan 2017 18:48:37 +0000 (19:48 +0100)]
[btls] Capture inner exception in MobileAuthenticatedStream

Previously we'd just throw the catched exception again
which overwrites its stacktrace, making it less useful
since all you can see is e.g. a NullReferenceException
(re)thrown at MobileAuthenticatedStream:218.

We now capture the original exception information so
the stacktrace is more complete.

7 years ago[btls] Use MONODROID ifdef instead of ANDROID
Alexander Köplinger [Mon, 9 Jan 2017 17:59:10 +0000 (18:59 +0100)]
[btls] Use MONODROID ifdef instead of ANDROID

We use the former everywhere else in the codebase.

7 years ago[btls] Fix wrong path returned from MonoBtlsProvider.GetSystemStoreLocation()
Alexander Köplinger [Mon, 9 Jan 2017 17:55:51 +0000 (18:55 +0100)]
[btls] Fix wrong path returned from MonoBtlsProvider.GetSystemStoreLocation()

The path ".mono/certs/NewTrust" doesn't actually exist,
it's called ".mono/new-certs/Trust". Look it up from
MonoBtlsX509StoreManager instead.

This API isn't used anywhere in the BTLS code, that's
probably why it wasn't noticed.

7 years ago[Mono.Security] Add message to obsolete APIs with replacements
Alexander Köplinger [Mon, 9 Jan 2017 13:32:11 +0000 (14:32 +0100)]
[Mono.Security] Add message to obsolete APIs with replacements

It's very confusing to get an "obsolete" warning
without knowing what to replace the API with.

7 years ago[System] Fixes ios unresolved symbols
Marek Safar [Mon, 9 Jan 2017 15:53:22 +0000 (16:53 +0100)]
[System] Fixes ios unresolved symbols

7 years agoMerge pull request #4195 from lateralusX/jlorenss/win-build-dependency
Johan Lorensson [Mon, 9 Jan 2017 13:20:38 +0000 (14:20 +0100)]
Merge pull request #4195 from lateralusX/jlorenss/win-build-dependency

Fix build_init vcxproj to correctly detect changes in config.h.

7 years agoAdd code manager callbacks so JIT can track memory chunk ranges and register stack...
Jonathan Chambers [Sat, 7 Jan 2017 09:00:37 +0000 (04:00 -0500)]
Add code manager callbacks so JIT can track memory chunk ranges and register stack walk handlers on Win64 (#4213)

7 years agoBump nunit-lite
Marek Safar [Fri, 6 Jan 2017 16:40:53 +0000 (17:40 +0100)]
Bump nunit-lite

7 years ago[tools] Add C# strings encoding to resx2sr
Marek Safar [Fri, 6 Jan 2017 16:40:26 +0000 (17:40 +0100)]
[tools] Add C# strings encoding to resx2sr

7 years ago[build] Update mini tests tools to use correct path
Marek Safar [Fri, 6 Jan 2017 09:28:04 +0000 (10:28 +0100)]
[build] Update mini tests tools to use correct path

7 years ago[corlib] Clean up some warnings
Marek Safar [Fri, 6 Jan 2017 08:12:11 +0000 (09:12 +0100)]
[corlib] Clean up some warnings

7 years ago[aot] Avoid a crash in the aot compiler if a delegate doesn't have a BeginInvoke...
Zoltan Varga [Fri, 6 Jan 2017 00:44:42 +0000 (19:44 -0500)]
[aot] Avoid a crash in the aot compiler if a delegate doesn't have a BeginInvoke ()/EndInvoke () method. Fixes #51206.

7 years ago[jit] Fix the check for calling mono_get_vtable_var (), check for 'cfg->method' inste...
Zoltan Varga [Fri, 6 Jan 2017 00:24:05 +0000 (19:24 -0500)]
[jit] Fix the check for calling mono_get_vtable_var (), check for 'cfg->method' instead of 'method', the latter is the inlined method. (#4209)

7 years ago[aot] Aot System.Numerics.dll as well for the make fullaotcheck/llvmonlycheck targets.
Zoltan Varga [Thu, 5 Jan 2017 21:39:38 +0000 (16:39 -0500)]
[aot] Aot System.Numerics.dll as well for the make fullaotcheck/llvmonlycheck targets.

7 years agoRevert "[reflection] Additional coop handles changes (#4197)"
Aleksey Kliger [Thu, 5 Jan 2017 17:08:53 +0000 (12:08 -0500)]
Revert "[reflection] Additional coop handles changes (#4197)"

This reverts commit 59ed24831a31d1e88027e8e717b61c53edface58.

7 years ago[msvc] Update csproj files (#4207)
monojenkins [Thu, 5 Jan 2017 16:36:22 +0000 (17:36 +0100)]
[msvc] Update csproj files (#4207)

7 years ago[reflection] Additional coop handles changes (#4197)
Aleksey Kliger (λgeek) [Thu, 5 Jan 2017 16:29:09 +0000 (11:29 -0500)]
[reflection] Additional coop handles changes (#4197)

* [sre] Add typed coop handle declarations

* [reflection] Implement mono_reflection_get_token_handle

  Rewrite mono_reflection_get_token_checked to use it.

* [reflection] Use handles for ves_icall_reflection_get_token

  - Get rid of mono_reflection_get_token_checked
  - Rename mono_reflection_get_token_handle to mono_reflection_get_token_checked

* [reflection] Use handles for ves_icall_GetCurrentMethod

* [reflection] Use handles for ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType_native

* [reflection] Use handles for ves_icall_System_Reflection_Module_ResolveSignature

* [reflection] Use handles for ves_icall_System_Type_internal_from_name

* [reflection] Use handles for ves_icall_System_Type_internal_from_handle

* [runtime] Use coop handles for System.Object.GetType ()

* [reflection] Use handles for ves_icall_MonoField_GetParentType

* [reflection] Use handles for ves_icall_MonoField_ResolveType

* [reflection] Use handles for most icalls in System.RuntimeTypeHandle

  - GetArrayRank
  - GetAttributes
  - GetBaseType
  - GetElementType
  - HasInstantiation
  - IsArray
  - IsByRef
  - IsComObject
  - IsGenericTypeDefinition
  - IsGenericVariable
  - IsPointer
  - IsPrimitive
  - type_is_assignable_from

* [reflection] Use handles for ves_icall_RuntimeTypeHandle_GetGenericTypeDefinition_impl

  and ves_icall_RuntimeTypeHandle_GetGenericParameterInfo

7 years ago[System] Cleanup some warnings
Marek Safar [Thu, 5 Jan 2017 13:59:38 +0000 (14:59 +0100)]
[System] Cleanup some warnings

7 years agoMerge pull request #4205 from marek-safar/compression
Marek Safar [Thu, 5 Jan 2017 08:37:55 +0000 (09:37 +0100)]
Merge pull request #4205 from marek-safar/compression

[System] Use GZipStream from corefx

7 years ago[bcl] Look in all .sources files when gathering files to dist
Alexander Köplinger [Thu, 5 Jan 2017 02:55:49 +0000 (03:55 +0100)]
[bcl] Look in all .sources files when gathering files to dist

Previously we would only look into files ending in libraryname.sources.
This breaks down in cases where we used e.g. "#include common.sources"
because those files don't match the pattern and would be left out.

To fix this we could either start resolving includes in the .sources,
but the simpler fix is to just dist files from all normal .sources files.

7 years ago[configure] avoid 'no symbols' warnings on darwin
Bernhard Urban [Wed, 4 Jan 2017 18:20:02 +0000 (19:20 +0100)]
[configure] avoid 'no symbols' warnings on darwin

This helps to get rid of the messages like these:

```
/Applications/Xcode8.1-beta1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libmonosgen-2.0.a(libmonoruntimesgen_la-coree.o) has no symbols
/Applications/Xcode8.1-beta1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libmonosgen-2.0.a(libmonoruntimesgen_la-file-mmap-windows.o) has no symbols
/Applications/Xcode8.1-beta1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libmonosgen-2.0.a(libmonoruntimesgen_la-lock-tracer.o) has no symbols
/Applications/Xcode8.1-beta1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libmonosgen-2.0.a(libmonoruntimesgen_la-mono-endian.o) has no symbols
[...]
```

That is what is in `libtool`:

```
# Commands used to build an old-style archive.
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib"
```

`ar` is calling `ranlib`, and then `libtool` calls `ranlib` again. We
cannot control how `ar` calls `ranlib` (that is, we can't tell it to
pass `-no_warning_for_no_symbols`), but we can control to not call it
at all.  Let's to that then.

As a reference, source code of `ar`:
https://opensource.apple.com/source/cctools/cctools-895/ar/ar.c.auto.html

7 years ago[msvc] Update csproj files (#4204)
monojenkins [Wed, 4 Jan 2017 22:50:10 +0000 (23:50 +0100)]
[msvc] Update csproj files (#4204)

7 years ago[mcs] Accept and ignore /debug:portable option
Alexander Köplinger [Wed, 4 Jan 2017 22:45:27 +0000 (23:45 +0100)]
[mcs] Accept and ignore /debug:portable option

We'll just generate a normal .mdb instead.

Decided not to update the help text since
technically we don't support generating a ppdb.

7 years ago[System] Use GZipStream from corefx
Marek Safar [Wed, 4 Jan 2017 22:36:32 +0000 (23:36 +0100)]
[System] Use GZipStream from corefx

7 years agoMerge pull request #4202 from marek-safar/compression
Marek Safar [Wed, 4 Jan 2017 22:32:36 +0000 (23:32 +0100)]
Merge pull request #4202 from marek-safar/compression

[System.IO.Compression] Replaced by corefx implementation

7 years ago[llvmonly] Use right IMT slow path for lazy array interfaces (#4199)
Alexander Kyte [Wed, 4 Jan 2017 22:00:34 +0000 (17:00 -0500)]
[llvmonly] Use right IMT slow path for lazy array interfaces (#4199)

7 years ago[System.Core] Fix infinite loop in csproj-local target
Alexander Köplinger [Wed, 4 Jan 2017 21:32:53 +0000 (22:32 +0100)]
[System.Core] Fix infinite loop in csproj-local target

This was introduced in 9d5de96b0f21b3602e7489c8d63c8db3034228fe since
we would now call the csproj-local target without `intermediate`
being set which results in an infinite loop.

Overriding the target doesn't seem to be necessary anymore, so remove it.

7 years ago[btls] Pass CC and CXX to the BTLS CMake and disable BTLS on older GCC (#4200)
Alexander Köplinger [Wed, 4 Jan 2017 18:49:41 +0000 (19:49 +0100)]
[btls] Pass CC and CXX to the BTLS CMake and disable BTLS on older GCC (#4200)

CMake doesn't pick up the compiler from the PATH by default,
it only looks in default locations so without this we might
end up using a different compiler for BTLS than for the main
Mono build which we don't want.

BTLS also requires a fairly new GCC which includes C++11
features, added a quick check for stdalign.h which BTLS
requires and disable it if the header isn't found.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=46712

7 years ago[build] Fixes monotouch_tv_runtime build
Marek Safar [Wed, 4 Jan 2017 16:34:34 +0000 (17:34 +0100)]
[build] Fixes monotouch_tv_runtime build

7 years ago[build] Fixes monotouch_runtime build
Marek Safar [Wed, 4 Jan 2017 16:19:49 +0000 (17:19 +0100)]
[build] Fixes monotouch_runtime build

7 years ago[System.IO.Compression] Replaced by corefx implementation
Marek Safar [Wed, 4 Jan 2017 14:32:53 +0000 (15:32 +0100)]
[System.IO.Compression] Replaced by corefx implementation

7 years agoRevert "Bump corlib version"
Marek Safar [Wed, 4 Jan 2017 12:46:29 +0000 (13:46 +0100)]
Revert "Bump corlib version"

This reverts commit acf7d8597142b558a3ec83c952b456ae81841eff.

7 years ago[System] Compression enums from corefx
Marek Safar [Wed, 4 Jan 2017 12:01:09 +0000 (13:01 +0100)]
[System] Compression enums from corefx

7 years ago[build] Fixes tarball build on systems with old mono
Marek Safar [Wed, 4 Jan 2017 11:37:12 +0000 (12:37 +0100)]
[build] Fixes tarball build on systems with old mono

7 years agoMerge pull request #4196 from DavidKarlas/stepAndCatchException
David Karlaš [Wed, 4 Jan 2017 06:49:11 +0000 (07:49 +0100)]
Merge pull request #4196 from DavidKarlas/stepAndCatchException

[Debugger] Fixed step-in and step-out in case of exception + unit tests

7 years ago[System] Include common.sources in the tarball
Alexander Köplinger [Wed, 4 Jan 2017 00:12:58 +0000 (01:12 +0100)]
[System] Include common.sources in the tarball

7 years agoBump corlib version
Alexander Köplinger [Wed, 4 Jan 2017 00:04:32 +0000 (01:04 +0100)]
Bump corlib version

Somehow mcs.exe disappeared from monolite even though it was added
in 68d56e8027809791b7ff64153bd0a77f9b408075 and worked for a while.

See if bumping corlib version (i.e. generating a new monolite) fixes it.

7 years ago[xbuild] Fix test that got broken by 248fded92a107a556d08fa77a9e458f0a990a28a
Alexander Köplinger [Tue, 3 Jan 2017 21:38:09 +0000 (22:38 +0100)]
[xbuild] Fix test that got broken by 248fded92a107a556d08fa77a9e458f0a990a28a

7 years agoMerge pull request #4152 from BrzVlad/misc-gc-altstack
Vlad Brezae [Tue, 3 Jan 2017 19:12:46 +0000 (21:12 +0200)]
Merge pull request #4152 from BrzVlad/misc-gc-altstack

[sgen] Reenable gc-altstack test

7 years ago[System] Warnings cleanup
Marek Safar [Tue, 3 Jan 2017 16:05:26 +0000 (17:05 +0100)]
[System] Warnings cleanup

7 years ago[System] Keep single MonoPInvokeCallbackAttribute implementation
Marek Safar [Tue, 3 Jan 2017 15:01:24 +0000 (16:01 +0100)]
[System] Keep single MonoPInvokeCallbackAttribute implementation

7 years ago[System] Unify Mono.Security dependency to be same for all profiles
Marek Safar [Tue, 3 Jan 2017 14:13:57 +0000 (15:13 +0100)]
[System] Unify Mono.Security dependency to be same for all profiles

7 years ago[xbuild] More tweaks for portable debug mode
Marek Safar [Tue, 3 Jan 2017 10:02:09 +0000 (11:02 +0100)]
[xbuild] More tweaks for portable debug mode

7 years ago[mcs] Disable more array interpolation on user code. Fixes #51166
Marek Safar [Mon, 2 Jan 2017 18:10:01 +0000 (19:10 +0100)]
[mcs] Disable more array interpolation on user code. Fixes #51166

7 years agoMerge pull request #4194 from DavidKarlas/bug44974
Marek Safar [Mon, 2 Jan 2017 18:03:45 +0000 (19:03 +0100)]
Merge pull request #4194 from DavidKarlas/bug44974

Bug 44974 - [pdb] stepping over is not working

7 years agoRoslyn 2.0 (rc2) upgrade
Marek Safar [Wed, 30 Nov 2016 14:38:21 +0000 (15:38 +0100)]
Roslyn 2.0 (rc2) upgrade

7 years ago[Debugger] Fixed step-in and step-out in case of exception + unit tests
David Karlaš [Wed, 28 Dec 2016 19:57:28 +0000 (20:57 +0100)]
[Debugger] Fixed step-in and step-out in case of exception + unit tests
Before this change step-in and step-out didn’t place breakpoints on catch handlers which caused code to continue execution instead of stopping since it missed all breakpoints…

7 years agoFix build_init vcxproj to correctly detect changes in config.h.
lateralusX [Wed, 28 Dec 2016 15:50:54 +0000 (16:50 +0100)]
Fix build_init vcxproj to correctly detect changes in config.h.

build_init project doesn't detect changes done in config.h. This is needed in order
for build_init to replace config.h with winconfig.h and backup cygconfig.h. This is
normally an issue if you do a reconfigure and build using make and then msbuild. The msbuild
will then fail, since config.h is still the cygwin version. Solution is to do a rebuild all
that will trigger build_init. This fix will make sure that build_init gets invoked if there has been a change to config.h.

There was also a very old issue with the first copy of config.h -> cygconfig.h. This is only done
if there is no cygconfig.h in the directory. This means that the cygconfig.h will not be update until
deleted and a new build_init has been invoked. This fix will make sure cygconfig.h is always updated
if config.h is the cygwin generated version (not already replaced with winconfig.h).

7 years agoMerge pull request #4193 from DavidKarlas/stepinSpeedup
David Karlaš [Wed, 28 Dec 2016 14:33:53 +0000 (15:33 +0100)]
Merge pull request #4193 from DavidKarlas/stepinSpeedup

[Debugger] Fixed bug where we loop randomly long(+1) and optimised stepping in(over) non-user code

7 years ago[Debugger] Fixed bug where we loop randomly long(+1 part) and optimised stepping...
David Karlaš [Wed, 28 Dec 2016 14:22:11 +0000 (15:22 +0100)]
[Debugger] Fixed bug where we loop randomly long(+1 part) and optimised stepping in(over) non-user code

7 years agoBug 44974 - [pdb] stepping over is not working
David Karlaš [Wed, 28 Dec 2016 14:10:15 +0000 (15:10 +0100)]
Bug 44974 - [pdb] stepping over is not working
mcs.exe didn’t emit some NOPs after method calls needed when doing StepOut, now that Roslyn emits this we correctly step out to line that called hence, some unit tests needed correcting

7 years ago[simd] Enable simd support when 32 bit floats are enabled.
Zoltan Varga [Wed, 28 Dec 2016 03:09:52 +0000 (22:09 -0500)]
[simd] Enable simd support when 32 bit floats are enabled.

7 years ago[llvm] Fix compilation/working with recent llvm versions. This should work with 4d6d2...
Zoltan Varga [Wed, 28 Dec 2016 01:08:55 +0000 (20:08 -0500)]
[llvm] Fix compilation/working with recent llvm versions. This should work with 4d6d2b05a267f9f4e46fdbb302f380add938b0cd from the mono/llvm repo.

7 years agoFix a warning.
Zoltan Varga [Tue, 27 Dec 2016 23:02:48 +0000 (18:02 -0500)]
Fix a warning.

7 years ago[reflection] Use handles for several more icalls (#4098)
Aleksey Kliger (λgeek) [Tue, 27 Dec 2016 20:37:18 +0000 (15:37 -0500)]
[reflection] Use handles for several more icalls (#4098)

* [runtime] Remove MonoReflectionGenericMethod typedef.

  - It's not used in the runtime,
  - Unlike other defs in object-internals.h it doesn't seem to have a
    corresponding managed object.

* [reflection] Add mono_field_get_object_handle.

  Reimplement mono_field_get_object and mono_field_get_object_checked in
  terms of it.

* [reflection] Add mono_property_get_object_handle

  Reimplement mono_property_get_object and
  mono_property_get_object_checked in terms of it.

* [reflection] Use handles for FieldInfo,MonoPropertyInfo,ParameterInfo.GetTypeModifiers

* [reflection] Use handles for MonoMethodInfo.get_parameter_info

  - Change mono_param_get_objects_internal to use handles

* [reflection] Cleanup in method_object_construct

* [reflection] Use handles for System.Refleciton.EventInfo.internal_from_handle_type

  - Replace mono_event_get_object_checked by mono_event_get_object_handle
    which uses handles.

* [reflection] Use handles for System.Reflection.MethodBase.GetMethodBodyInternal

  - Replace mono_method_body_get_object_checked by
    mono_method_body_get_object_handle

* [reflection] Remove CHECK_OR_CONSTRUCT, it's dead code.

  All former callers now use CHECK_OR_CONSTRUCT_HANDLE

* [reflection] Use handles for FieldInfo.get_marshal_info and MonoMethodInfo.get_retval_marshal

  - Change mono_reflection_marshal_as_attribute_from_marshal_spec to
    return a handle; fix callers

* [metadata] Add mono_metadata_get_canonical_generic_inst utility function

* [reflection] Use handles for System.Reflection.Module.ResolveMemberToken and 3 more icalls

  - ResolveFieldToken
  - ResolveMethodToken
  - ResolveTypeToken

7 years ago[threadpool] Restore handle stack mark after a worker PerformWaitCallback
Aleksey Kliger [Thu, 22 Dec 2016 17:32:47 +0000 (12:32 -0500)]
[threadpool] Restore handle stack mark after a worker PerformWaitCallback

If a task calls native code that uses handles before completing, we should
dispose of any handles that it may have used before we park the worker.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=49423

7 years ago[sgen] Assert that skipped threads have empty an HandleStack
Aleksey Kliger [Thu, 22 Dec 2016 17:31:46 +0000 (12:31 -0500)]
[sgen] Assert that skipped threads have empty an HandleStack

If we skip scanning a thread with a non-empty handle stack, we may move an
object but fail to update the reference in the handle.

7 years ago[coop handles] Add mono_handle_stack_is_empty
Aleksey Kliger [Wed, 21 Dec 2016 20:15:06 +0000 (15:15 -0500)]
[coop handles] Add mono_handle_stack_is_empty

7 years ago[coop handles] Add MONO_HANDLE_TRACK_OWNER mode.
Aleksey Kliger [Wed, 21 Dec 2016 15:29:40 +0000 (10:29 -0500)]
[coop handles] Add MONO_HANDLE_TRACK_OWNER mode.

If MONO_HANDLE_TRACK_OWNER is defined, each coop handle records the source location
where it was first allocated.

7 years ago[System] Fix basic/build profile build
Alexander Köplinger [Thu, 22 Dec 2016 22:35:19 +0000 (23:35 +0100)]
[System] Fix basic/build profile build

It was broken by 37875ca6f3b0e65eb5750ebf556d5355da8715e9.

7 years ago[runtime] Add a few missing object offsets for arm.
Zoltan Varga [Thu, 22 Dec 2016 22:32:27 +0000 (17:32 -0500)]
[runtime] Add a few missing object offsets for arm.

7 years ago[jit] Fix a test which fails on big endian.
Neale Ferguson [Thu, 22 Dec 2016 22:09:38 +0000 (17:09 -0500)]
[jit] Fix a test which fails on big endian.

7 years ago[System] Remove duplicated sources info
Marek Safar [Thu, 22 Dec 2016 18:15:26 +0000 (19:15 +0100)]
[System] Remove duplicated sources info

7 years ago[System] remove unused file
Marek Safar [Thu, 22 Dec 2016 10:53:37 +0000 (11:53 +0100)]
[System] remove unused file

7 years agoconfigure.ac: set CSC variable to mcs.exe when using mcs as the compiler
Alexander Köplinger [Thu, 22 Dec 2016 17:49:46 +0000 (18:49 +0100)]
configure.ac: set CSC variable to mcs.exe when using mcs as the compiler

Otherwise it'd still be using Roslyn e.g. in mono/mini as $(CSC)
would continue to point to the Roslyn csc.exe which is wrong.

7 years agoPump hazard pointer queue in unregister_thread while thread is still alive. (#4183)
Aleksey Kliger (λgeek) [Thu, 22 Dec 2016 16:41:04 +0000 (11:41 -0500)]
Pump hazard pointer queue in unregister_thread while thread is still alive. (#4183)

Some of the destructors (for example mono_jit_info_table_free) may try to take
a lock, which requires that the current thread should be attached.

7 years agoFix MonoBtlsX509StoreManager machine store paths (#4027)
faulpeltz [Thu, 22 Dec 2016 13:08:50 +0000 (14:08 +0100)]
Fix MonoBtlsX509StoreManager machine store paths (#4027)

The machineXYZPath fields are initialized with machinePath instead of
userPath which caused the machine stores not to work at all

7 years agoFix a regression introduced by 98d7ad045e6661e4c2e428fe4acc4fc733d44fdc.
Zoltan Varga [Thu, 22 Dec 2016 12:04:44 +0000 (07:04 -0500)]
Fix a regression introduced by 98d7ad045e6661e4c2e428fe4acc4fc733d44fdc.

7 years ago[build] More mcs hacking
Marek Safar [Thu, 22 Dec 2016 10:40:47 +0000 (11:40 +0100)]
[build] More mcs hacking

7 years ago[build] install csc aot images from aot folder
Marek Safar [Thu, 22 Dec 2016 10:37:21 +0000 (11:37 +0100)]
[build] install csc aot images from aot folder

7 years ago[System.Xml] Disable more failing tests on old xslt implementation
Marek Safar [Thu, 22 Dec 2016 09:38:02 +0000 (10:38 +0100)]
[System.Xml] Disable more failing tests on old xslt implementation

7 years ago[System.Xml] Disable failing tests on old xslt implementation
Marek Safar [Thu, 22 Dec 2016 09:30:39 +0000 (10:30 +0100)]
[System.Xml] Disable failing tests on old xslt implementation

7 years ago[build] Pass --aot-path to the runtime when building the tests in tests/.
Zoltan Varga [Thu, 22 Dec 2016 01:41:15 +0000 (20:41 -0500)]
[build] Pass --aot-path to the runtime when building the tests in tests/.

7 years ago[build] Generate all aot images for csc into the profile directory instead of next...
Zoltan Varga [Thu, 22 Dec 2016 01:39:01 +0000 (20:39 -0500)]
[build] Generate all aot images for csc into the profile directory instead of next to the corresponding assembly so the external/roslyn-binaries submodule doesn't get dirty. Pass the --aot-path argument to the runtime so it picks up the aot images.

7 years agoFix warnings.
Zoltan Varga [Thu, 22 Dec 2016 00:48:43 +0000 (19:48 -0500)]
Fix warnings.

7 years ago[runtime] Remove some dead code.
Zoltan Varga [Thu, 22 Dec 2016 00:37:52 +0000 (19:37 -0500)]
[runtime] Remove some dead code.

7 years ago[aot] Cleanup the AOT loading code a bit. Add a --aot-path= command line option to...
Zoltan Varga [Thu, 22 Dec 2016 00:30:27 +0000 (19:30 -0500)]
[aot] Cleanup the AOT loading code a bit. Add a --aot-path= command line option to specify additional directories to search for AOT images. (#4191)

7 years ago[bcl] Clean up old run-test.bat and *.csproj files
Alexander Köplinger [Wed, 21 Dec 2016 17:20:21 +0000 (18:20 +0100)]
[bcl] Clean up old run-test.bat and *.csproj files

They .bat files haven't been used for a long time and don't work anymore.
The csproj files for the facades have a different name now.