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

[mempool] Annotate functions for clang's ThreadSanitizer #5191

Merged
merged 3 commits into from Jul 21, 2017

Conversation

Projects
None yet
6 participants
@cherusker
Contributor

cherusker commented Jul 8, 2017

As discussed (https://bugzilla.xamarin.com/show_bug.cgi?id=57936) and suggested by @luhenry and @vargaz, I whitelisted three functions of mempool.c in order to hide race reports of clang's ThreadSanitizer.

@dnfclas

This comment has been minimized.

dnfclas commented Jul 8, 2017

@cherusker,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

// https://bugzilla.xamarin.com/show_bug.cgi?id=57936
__attribute__ ((no_sanitize("thread")))
#endif
#endif

This comment has been minimized.

@vargaz

vargaz Jul 8, 2017

Member

Can't we add a macro somewhere else and just use it instead of duplicating this 3 times ?

This comment has been minimized.

@cherusker

cherusker Jul 8, 2017

Contributor

Definitely, I just added a fixup commit! Generally, I think the NO_SANITIZE_THREAD macro can be immensely useful if we decide to explicitly whitelist more races of that nature ... there are ~ 50 races that are directly connected to debugging / reporting variables. As I am new and don't want to simply put a macro SOMEwhere in the code - where am I supposed to put it? :) Should I create a new header file (e.g. sanitizing.h in mono/utils/) that can be used for more sanitizing macros in the future as the overall plan is to include more of clang's sanitizers?

This comment has been minimized.

@vargaz

vargaz Jul 8, 2017

Member

You can put it into utils/mono-compiler.h.

This comment has been minimized.

@cherusker

cherusker Jul 8, 2017

Contributor

Should I prefix the macro with MONO_ (making it MONO_NO_SANITIZE_THREAD) like all the other __attribute__ macros in that file?

This comment has been minimized.

@vargaz

vargaz Jul 8, 2017

Member

Probably yes.

This comment has been minimized.

@cherusker

cherusker Jul 8, 2017

Contributor

Alright, I'll add that instantly! Thank you! :)

@vargaz

This comment has been minimized.

Member

vargaz commented Jul 8, 2017

Also, is it possible to disable it for a block of code instead of a whole function ?

@cherusker

This comment has been minimized.

Contributor

cherusker commented Jul 8, 2017

Sadly, as I understand it, reporting can only be turned off for whole functions or whole source files. It is possible, to use #if __has_feature(thread_sanitizer) ... to execute different code if the sanitizer is active - we could add additional mutexes for sanitizing runs or stop executing total_bytes_allocated += initial_size; at all (when running the TheadSanitizer). Both approaches would correct the race but would also change the semantics (which, in my opinion, is no desirable feature of a sanitizer). Reporting itself can only be blocked on a function and / or source file level.

@cherusker cherusker force-pushed the cherusker:cherusker-2017-07-08-annotate-mempool branch 2 times, most recently from ee9448f to 01fda3a Jul 8, 2017

@@ -113,5 +113,16 @@ typedef SSIZE_T ssize_t;
#define MONO_GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
/* Used to tell clang's ThreadSanitizer to not report data races that occur within a certain function */
#if defined(__has_feature)

This comment has been minimized.

@alexrp

alexrp Jul 9, 2017

Member

Could we factor this into a separate macro? Like so:

#if defined (__has_feature)
#define MONO_CLANG_HAS_FEATURE (...) (__has_feature (__VA_ARGS__))
#else
#define MONO_CLANG_HAS_FEATURE (...) (FALSE)
#endif

#if MONO_CLANG_HAS_FEATURE (thread_sanitizer)
#define MONO_NO_SANITIZE_THREAD __attribute__ ((no_sanitize ("thread")))
#else
#define MONO_NO_SANITIZE_THREAD
#endif

This comment has been minimized.

@vargaz

vargaz Jul 9, 2017

Member

I'd prefer having a simple macro, not a magic one.

This comment has been minimized.

@cherusker

cherusker Jul 9, 2017

Contributor

@vargaz are you for or against @alexrp's idea? Generally non of the two versions look too magical to me - the current one is more compact (IMO), the idea of @alexrp has a better reusability which will come handy when working with other clang features in the future - generally I'm tempted to use what @alexrp suggested :)

This comment has been minimized.

@vargaz

vargaz Jul 9, 2017

Member

I like the simple version.

This comment has been minimized.

@cherusker

cherusker Jul 11, 2017

Contributor

I would suggest to leave it as it is for this PR but definitely think about expanding the macro, once more checkers are added that rely on __has_feature.

@@ -95,6 +96,14 @@ mono_mempool_new (void)
* \param initial_size the amount of memory to initially reserve for the memory pool.
* \returns a new memory pool with a specific initial memory reservation.
*/
// clang's ThreadSanitizer detects races of total_bytes_allocated and pool->d.allocated throughout the functions

This comment has been minimized.

@luhenry

luhenry Jul 9, 2017

Member

Use same comments as above

This comment has been minimized.

@cherusker

cherusker Jul 9, 2017

Contributor

The comment above is some sort of doxygen / interface description - I thought it might make things clearer if I use the other kind of documentation used in that file (the // comments ...) for that additional information that just describes the macro.

Should I put the info about MONO_NO_SANITIZE_THREAD within the same comment blocks (between * \returns ... and */) or should I open a new comment block?

Alternatively, I could also put the long text only once somewhere at the top of the file and simply explain with a few words per function to look there for further information?

This comment has been minimized.

@luhenry

luhenry Jul 10, 2017

Member

You can put this comment as part of the above comment in the following manner:

/**
 * mono_mempool_new_size:
 *
 *   clang's ThreadSanitizer detects races of total_bytes_allocated and pool->d.allocated throughout the functions
 *     * mono_mempool_alloc
 *     * mono_mempool_new_size
 *     * mono_mempool_destroy
 *   while these races could lead to wrong values, total_bytes_allocated is just used for debugging / reporting and since
 *   the mempool.c functions are called quite often, a discussion led the the conclusion of ignoring these races:
 *   https://bugzilla.xamarin.com/show_bug.cgi?id=57936
 *
 * \param initial_size the amount of memory to initially reserve for the memory pool.
 * \returns a new memory pool with a specific initial memory reservation.
 */

This comment has been minimized.

@cherusker

cherusker Jul 11, 2017

Contributor

Thanks, I just added a [fixup!] commit! :)

@@ -124,6 +133,14 @@ mono_mempool_new_size (int initial_size)
*
* Free all memory associated with this pool.
*/
// clang's ThreadSanitizer detects races of total_bytes_allocated and pool->d.allocated throughout the functions

This comment has been minimized.

@luhenry

luhenry Jul 9, 2017

Member

Use same comments as above

@@ -258,6 +275,14 @@ get_next_size (MonoMemPool *pool, int size)
*
* \returns the address of a newly allocated memory block.
*/
// clang's ThreadSanitizer detects races of total_bytes_allocated and pool->d.allocated throughout the functions
// * mono_mempool_alloc

This comment has been minimized.

@luhenry

luhenry Jul 9, 2017

Member

Use same comments as above

@cherusker cherusker force-pushed the cherusker:cherusker-2017-07-08-annotate-mempool branch from 01fda3a to bb10fdc Jul 11, 2017

@lewurm lewurm merged commit 792a016 into mono:master Jul 21, 2017

8 of 12 checks passed

Linux i386 Build finished. 46555 tests run, 1351 skipped, 1 failed.
Details
OS X i386 Build finished. 44576 tests run, 1224 skipped, 0 failed.
Details
Windows i386 Build finished. 29791 tests run, 988 skipped, 1 failed.
Details
Windows x64 Build finished. No test results found.
Details
API Diff No public API changes found.
Details
Linux AArch64 Build finished. 46552 tests run, 1359 skipped, 0 failed.
Details
Linux ARMv5 soft float Build finished. 46524 tests run, 1354 skipped, 0 failed.
Details
Linux ARMv7 hard float Build finished. 46524 tests run, 1354 skipped, 0 failed.
Details
Linux x64 Build finished. 46555 tests run, 1353 skipped, 0 failed.
Details
Linux x64 FullAOT Build finished. 20895 tests run, 528 skipped, 0 failed.
Details
OS X x64 Build finished. 45312 tests run, 1236 skipped, 0 failed.
Details
Test Result Viewer Click to view aggregated test results (Xamarin internal).
Details

@cherusker cherusker deleted the cherusker:cherusker-2017-07-08-annotate-mempool branch Jul 21, 2017

cherusker added a commit to cherusker/mono-website that referenced this pull request Jul 22, 2017

cherusker added a commit to cherusker/mono-website that referenced this pull request Jul 22, 2017

cherusker added a commit to cherusker/mono-website that referenced this pull request Jul 22, 2017

cherusker added a commit to cherusker/mono-website that referenced this pull request Jul 22, 2017

baulig added a commit to baulig/mono that referenced this pull request Aug 1, 2017

Sync with mono/master commit 48dfc30fb6848b20f0109cfa5e274dc15d013580.
Squashed commit of the following:

commit 48dfc30fb6848b20f0109cfa5e274dc15d013580
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Tue Aug 1 06:54:14 2017 +0200

    Update CODEOWNERS.

commit 26d2e2649fdaff09accf71f30fa361169685540d
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Tue Aug 1 06:50:05 2017 +0200

    [profiler] Move legacy profiler code to profiler.c.

    These symbols weren't being properly exported in the final mono executable on
    Mac because no code in the runtime called these functions. As long as they're
    defined in an object file that contains used functions, they'll be exported.

commit 1f6708aadd4578299be05833401a24853ba01291
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Fri Jul 28 23:23:51 2017 +0200

    [mini] Add a mono_jit_aot_compiling () function.

commit fcfa0a3110155a13ef9021c3cea68e8b97002bf7
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Fri Jul 28 23:20:23 2017 +0200

    [mini] Remove some unstable exports that are no longer used by the profiler.

commit 50065f3f19b7cb6f10fdf781b318289cd1eeb157
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 26 00:55:22 2017 +0200

    [profiler] Implement call context introspection for enter/leave events.

    When this feature is enabled for a method, the enter/leave event receives an
    additional argument, a so-called 'call context'. This call context contains
    enough information about the stack frame of the instrumented method to allow
    the enter/leave callback to inspect the 'this' reference, method arguments,
    local variables, and the return value (for non-void methods).

    This feature enables some interesting scenarios that were not possible with
    the regular enter/leave events. For example, a profiler could instrument
    well-known methods in the managed thread pool code to get an idea of how an
    application is using the thread pool, or it could instrument network-related
    methods to gather statistics or even log all network traffic.

    This is implemented by storing a MonoProfilerCallContext on the stack, whose
    MonoContext field is populated by executing an OP_FILL_PROF_CALL_CTX opcode
    which stores the stack pointer, frame pointer, and all callee-saved registers
    to it. For the epilogue, a pointer to the return value (for non-void methods)
    is also stored in the MonoProfilerCallContext. An address to this context is
    then passed to mono_profiler_raise_method_enter/leave. Based on debug info,
    all arguments and locals can then be looked up in the instrumented method's
    stack frame.

    For the interpreter, we just store an InterpFrame pointer on the
    MonoProfilerCallContext and look everything up from that. We don't need debug
    info in this case.

    This feature is currently not supported with LLVM (for regular LLVM mode, it
    will fall back to Mono's JIT, while for LLVM-only mode, it's not available).

    I also refactored the interpreter code so that enter/leave events are generated
    not only when interpreter debugging is enabled. Also, the interpreter will only
    call mono_profiler_get_call_instrumentation_flags () once per method now.
    Finally, I made the interpreter also generate exception leave events.

commit 1765c86b7cfc92596a4d73d1d06861e7271d722f
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Mon Jul 31 18:35:16 2017 -0400

    [sre] Pass declaring type to GetMethodFromHandle in
    GenericTypeParameterBuilder:InternalResolve (Fixes #58454)

    When the parameter belongs to a method builder, we need to pass the declaring
    type (appropriately resolved) to GetMethodFromHandle to avoid an
    ArgumentException.

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

commit dff3cb3dde823361a4c396f01ef57af68c6c86ef
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Fri Jul 28 22:01:13 2017 +0200

    [ci] Compile the class lib tests in a separate step

    Compiling in parallel via -j should also be faster.
    We had this on Wrench but it didn't make it over to Jenkins.

commit 6fff9e2414b20c115a90006665f2f4721ec86bf5
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Mon Jul 31 18:02:32 2017 +0200

    [mono-symbolicate] Run tests with "run-test" target instead of "test"

    The "test" target is used to precompile the tests but actual running
    should happen with the "run-test" target.

commit a16ff89af35e3246801facaa5819a38d7668c9f3
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Mon Jul 31 18:33:19 2017 -0400

    [test] Check that GenericTypeParamBuilder:InternalResolve passes declaring type
    to GetMethodFromHandle

    Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=58454

commit 9f8db052cd393d5acbb046c454a50d5ebd91a26a
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 31 11:20:22 2017 -0400

    [llvm] Fix the calling of fault clauses in llvm compiled code. Fixes #58446. (mono#5286)

commit 3a07c5602fb9ceb76ddca1caed9f27c9d644ce09
Author: Marek Safar <marek.safar@gmail.com>
Date:   Mon Jul 31 16:58:14 2017 +0200

    [mcs] Implements C#7 expression bodied members enhancement

commit 461829b65180718e1de5b88fee3092f918fb4eee
Author: Marek Safar <marek.safar@gmail.com>
Date:   Mon Jul 31 16:13:59 2017 +0200

    [mcs] Add parser sequence for case type pattern matching

commit 2a24488acdf6f29a6fd21e8f0d87af845324e902
Author: Marek Safar <marek.safar@gmail.com>
Date:   Fri Jul 28 11:12:47 2017 +0200

    [mcs] Implements cloning for yield break. Fixes #57796

commit 579a0a87fedd65f82e416e380a5f998785723321
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Fri Jul 28 00:16:18 2017 -0400

    Eglib integrate (mono#5267)

    * [runtime] Integrate eglib's configure into mono's configure to simplify and speed up the configure process.

    * [runtime] Delete some duplicate eglib configure code.

commit 8c616c0bccffa0a407c9fd5e9939ee16b1ed6f2d
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Thu Jul 27 11:47:34 2017 -0400

    Bump corlib version

    Due to changed semantics of ModuleBuilder:RegisterToken icall (it now does not
    allow an EnumBuilder argument)

commit d3fe5213767f001e5db79ec0e822a968e7b0d2c4
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Wed Jul 26 16:59:22 2017 -0400

    [sre] Resolve EnumBuilder tokens in managed. (Fixes #58361)

    In particular, delegate to the TypeBuilder within the EnumBuilder.

    Also do not register the EnumBuilder object with the runtime.  (Fixes
    https://bugzilla.xamarin.com/show_bug.cgi?id=58361)

commit 44772ccdfc9344fff71522766360401eb28dbc4b
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Wed Jul 26 15:27:48 2017 -0400

    [test] EnumBuilder regression tests for #58361

    Cause the creation of a token for an EnumBuilder object.  Test both typedef
    tokens (EnumBuilder from same assembly) and typeref token (EnumBuilder in another assembly)

commit 6a5a2990deb1be4cb0dde7e41807dbc2df72c622
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Wed Jul 26 11:39:36 2017 -0400

    [sre] Add MonoDynamicImageTokCollision arg to mono_dynamic_image_register_token

    The new argument controls what should happen when the given token is already
    present.

    In some situations it's expected that we either see the same object, or we
    unconditionally want to replace it (for example if we previously registered a
    TypeBuilder or a MethodBuilder, after the type or method is created, we will
    re-register the RuntimeType or MonoMethod in its place).  In other cases (for
    example when a module references a MonoMethod from a different assembly), we
    may still call `mono_image_create_token()` multiple times but we expect to see
    the same MonoMethod object.

commit f44a75ff98bb433ce5c0a7dbc4f1b2bbe65b12ed
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Wed Jul 26 19:37:20 2017 -0400

    [sre] Handle typeref tokens in fixup_method (Fixes #58421)

    This may occur if there are two AssemblyBuilders in progress and one of them
    refers to a TypeBuilder from the other.

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

commit 26ac324153dfb04d561b5f332ed3c16c145185af
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Wed Jul 26 19:36:05 2017 -0400

    [test] Check that one AssemblyBuilder can refer to a TypeBuilder from another.

    Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=58421

commit 30e35383d91866db46c4908d1f1cd6863f0fc172
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Tue Jul 25 22:10:56 2017 -0400

    [interp] Make the 'td' variable a pointer in generate () for consistency with the rest of the code.

commit 22ad9cd9d52d5632d53f64608d7417b123e60a45
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Tue Jul 25 21:46:44 2017 -0400

    [interp] Rename some types to better reflect their function.

    MonoInvocation -> InterpFrame
    RuntimeMethod -> InterpMethod
    runtime_method -> imethod

commit 197adf23e48a4224eaa28c66631cb5676e1d5bb4
Author: Marek Safar <marek.safar@gmail.com>
Date:   Thu Jul 27 10:38:15 2017 +0200

    [mcs] Another workaround for enum builder SRE crash (this time on Mono)

commit c6bf2a2f59ebc43143b372d7d600d8aaec9d76a6
Author: Marek Safar <marek.safar@gmail.com>
Date:   Thu Jul 27 09:07:09 2017 +0200

    Updates codeowners

commit 09807bcf18e3367a494e0a6bcd729d4499a55f81
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Wed Jul 26 21:35:38 2017 -0400

    [runtime] Move object.c to 'common_sources', as it no longer has compile time gc dependencies.

commit 6b3b1589c220a364e25ced2f845304a86f3dcf30
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Wed Jul 26 21:33:12 2017 -0400

    Sre not gc dependent (mono#5264)

    * [runtime] Move the sre source files to 'common_sources', they no longer have compile time gc dependencies after the Boehm GC root changes. sre.c still depends on the gc dependent caching code in reflection-cache.h.

    * [runtime] Remove compile time gc dependencies from the reflection caching code.

    * [runtime] Move reflection.c/sre.c to 'common_sources', they no longer have compile time gc dependencies.

commit 269fc774845cee7439a87d37c7f331a220867455
Author: Marek Safar <marek.safar@gmail.com>
Date:   Wed Jul 26 23:59:44 2017 +0200

    [corlib] Update Assembly class xml descriptor

commit d79b8dfe0818b092a923859fb0b0256ed034f1e9
Author: monojenkins <jo.shields+jenkins@xamarin.com>
Date:   Wed Jul 26 15:39:55 2017 +0000

    [msvc] Update csproj files

commit fc9090e6953842fd3ed1b223cd173cc7d45c75e9
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Wed Jul 26 10:16:03 2017 -0400

    [sre] Add some tests for saving assemblies. (mono#5265)

commit 0c45a741dc906913f1a2ee9f9578498b714a539b
Author: Marek Safar <marek.safar@gmail.com>
Date:   Wed Jul 26 13:27:13 2017 +0200

    [Mono.CSharp] Updates csproj

commit 1f44f8256c89215f58712a76b118b7e0785ce969
Author: Marek Safar <marek.safar@gmail.com>
Date:   Wed Jul 26 13:25:44 2017 +0200

    [mcs] Adds workaround for repl enum declaration on .net SRE

commit 65bf0cd305aa3027e8a50597085a94f3f62c97b1
Author: Marek Safar <marek.safar@gmail.com>
Date:   Tue Jul 25 16:32:13 2017 +0200

    [corlib] ModuleBuilder pseudo-token lookup needs to use references insteads of logical equality comparer.

    Fixes #58291

commit 2acff18c3cbd4554bfbd55c72c88979c38b36ce1
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Wed Jul 26 13:03:52 2017 +0200

    [acceptance-tests] Another attempt fix a StringBuilder race in the profiler stress runner.

commit 1a4dc1c6280de9462b17f085fb431141a65993fd
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Tue Jul 25 23:07:49 2017 -0400

    [runtime] Remove compile time gc dependencies from object.c. (mono#5266)

commit 2ed38105a38a34e810fbb03fd525389c726b9b00
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Tue Jul 25 20:31:42 2017 -0400

    [runtime] Remove compile-time gc dependencies from domain.c/appdomain.c. (mono#5263)

    * [runtime] Remove compile-time gc dependencies from domain.c/appdomain.c.

    * [runtime] Move domain.c/appdomain.c to 'common_sources' since they no longer have compile time gc dependencies.

commit d0a75e0fbb3c65a0dbc2d0de9917f9fb4eef10d5
Author: monojenkins <jo.shields+jenkins@xamarin.com>
Date:   Tue Jul 25 15:58:32 2017 +0000

    [msvc] Update csproj files

commit 934512f7d7d39bd6bb387a8bbdccbc032d525576
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Tue Jul 25 16:16:11 2017 +0200

    [interp] Fix a copy/paste error in ea4e4a9.

commit ff19546a0df565146013c79166ab2f4ef06ddf6c
Author: Marek Safar <marek.safar@gmail.com>
Date:   Tue Jul 25 12:12:15 2017 +0200

    Bump roslyn (to include more files)

commit 4067cd96624659dc51fe2e69c34c602e71d021d0
Author: monojenkins <jo.shields+jenkins@xamarin.com>
Date:   Tue Jul 25 07:59:43 2017 +0000

    Bump API snapshot submodule

commit 876a92fbf390f70c88cc1e90c370dc71b7480717
Author: Marek Safar <marek.safar@gmail.com>
Date:   Mon Jul 24 20:28:39 2017 +0200

    Bump CoreFX

commit 6820cab30ffe3bacbf4f6f7d97af7a61225aa128
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Mon Jul 24 23:42:45 2017 +0300

    [runtime] Remove handler block trampoline code

commit 0fa471e52e505bdac8dab4d65e5f68879a72d6f0
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Mon Jul 24 21:08:52 2017 +0300

    [runtime] Fix handler block

    Instead of hijacking the return address when suspending a thread in a finally block for an abort, do an explicit check in managed code when we are returning from the handler in order to see if we need to abort. Hijacking the return address is arch specific and it doesn't work if we are suspended before it is initialized in handler start.

    Fixes mono#5798

commit 545701e60088b61321dc917dc03012c631761233
Author: Alexis Christoforides <alexis@thenull.net>
Date:   Tue Jul 25 01:25:54 2017 -0400

    Update bockbuild. Fixes #57002

commit 48960a0307bef92308f39cd8d22186d079e9bd18
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 24 23:20:43 2017 -0400

    [runtime] Fix the size calculation for CustomAttributeType coded indexes, they can only point to the MethodDef/MemberRef tables even through 3 bits are used to encode them, only 2 values are used. Fixes #58210. (mono#5256)

commit cfb8d46508367a599ee6d84dfd831baa3db15a1a
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 24 18:28:52 2017 -0400

    [jit] Handle OP_VCALL_MEMBASE in get_simd_vreg (). Fixes #58344.

commit 36261e9fee264238e6763786b817cbf740080962
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 24 17:35:08 2017 -0400

    Bump bockbuild.

commit 6930fe5e1156368790308cc197ceb94a53f00daa
Author: Marek Safar <marek.safar@gmail.com>
Date:   Mon Jul 24 16:24:43 2017 +0200

    Bump roslyn to 2.3.1

commit 8cbd5661f9f44aca64bd61bd48d0a80415d50566
Author: Vladimir Kazakov <vladimir.kazakov@live.com>
Date:   Sun Jul 2 13:31:33 2017 +0300

    XMLDSIG transforms from .NET Core.

commit 91ed07cea8517c25e01cc40b3dc69c17d330671f
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 24 11:31:34 2017 -0400

    Bump bockbuild.

commit 7aa163c1dd884150c598d0874a5bda8813e0bedd
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Sun Jul 23 07:24:55 2017 +0200

    Update CODEOWNERS

commit 4707bdd3744d984f77b2ac639122da46379e37ee
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 22 17:15:11 2017 +0200

    [Mono.Profiler.Log] Catch SecurityException for missing icalls.

    This is the exception that is thrown on .NET because icalls are not allowed in
    non-GAC assemblies.

commit 46bb280964f9cad059a5c0254df7eed8736b2e6c
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 22 15:58:54 2017 +0200

    [acceptance-tests] Disable the ironjs-v8 test on arm32/arm64.

    It times out even with a 24-hour timeout. Eventually we should investigate why,
    but disable it for now so the lane can become green.

commit 899263afe7ff3408ef98a99e9b13ffe24c477551
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 22 14:42:06 2017 +0200

    [acceptance-tests] Fix a crash in the profiler stress runner caused by racey modification of a StringBuilder.

commit 1c61e547aa6f074061df498503e6bf111d358d78
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 22 14:35:33 2017 +0200

    [acceptance-tests] Set individual timeout for profiler stress tests back to 8 hours.

commit 7448fda8e9dd89e804e3b51e3df2ec72e22e5671
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 22 14:33:35 2017 +0200

    [acceptance-tests] Build profiler stress runner with debug info.

commit 9dbcf0345a662650868f2a30ac1aab85d81f8f72
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Fri Jul 21 20:02:43 2017 -0400

    [bockbuild] Avoid overwriting self.local_configure_flags in some packages, extend them instead. (mono#5239)

commit 848851a8075cfa9949e5b101a3cab5ba0f84496c
Author: Armin Hasitzka <cherusker@users.noreply.github.com>
Date:   Fri Jul 21 11:39:04 2017 +0200

    [mempool] Annotate functions for clang's ThreadSanitizer (mono#5191)

    * [mempool] Annotate functions for ThreadSanitizer
    Whitelist `mono_mempool_alloc`, `mono_mempool_new_size` and `mono_mempool_destroy` according to https://bugzilla.xamarin.com/show_bug.cgi?id=57936

    * [fixup!] Test the NO_SANITIZE_THREAD macro

    * [fixup!] Merge comments / documentation

commit e3bfd1ffa5f1aefa8b03496ca668032da42f3fc4
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Fri Jul 21 11:12:58 2017 +0200

    [acceptance-tests] Temporarily increase the profiler stress timeout to 24 hours.

    This is temporary and is just to see how long ironjs-v8 actually takes to complete on ARM. We may need to just exclude it there.

commit ba702558b8cbc939cf261310e71ac7a895c7d06a
Author: monojenkins <jo.shields+jenkins@xamarin.com>
Date:   Fri Jul 21 08:50:26 2017 +0000

    Bump API snapshot submodule

commit 41893cb1b55e4c69a002e1a917db1907995efd03
Author: pjt33 <github@cheddarmonk.org>
Date:   Thu Jul 20 13:02:16 2017 +0200

    Implement ServiceEndpoint.EndpointBehaviors

    This follows the reference source in understanding `EndpointBehaviors` to be an alias of `Behaviors` with a more general type.

    Note that although an alias might not seem necessary to implement, when using netstandard1.3 the [`System.ServiceModel.Primitives`](https://www.nuget.org/packages/System.ServiceModel.Primitives) package exposes `EndpointBehaviors` but not `Behaviors`.

commit deb4f73870da18d10f690f641bae119147cf4436
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Fri Jul 21 09:53:46 2017 +0200

    [msvc] Update project files with new profiler-related source files.

commit 8ff3258bccc6c63e19dab648b5345eb90334599f
Author: Miguel de Icaza <miguel@gnome.org>
Date:   Thu Jul 20 22:47:48 2017 -0400

    [Marshal.IsComObject] Make this predicate return false instead of throwing an exception which is what the calling code expects (mono#5246)

commit 3f8e81016b9b34be72322c6e36a046a6bd575582
Author: Ludovic Henry <ludovic@xamarin.com>
Date:   Thu Jul 20 16:08:26 2017 -0400

    Reenable MonoTests.Remoting.IpcChannelTest.Bug609381 (mono#5245)

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

commit 41194ee643b49ea12da0553fd75c063bb4e5bf50
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 20 21:13:15 2017 +0200

    [msvc] Update def files.

commit 427fa35c6d3c0a07488deb9134cc7e414a500ae5
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 20 20:44:25 2017 +0200

    [profiler] Add back some legacy profiler API functions.

    These are used by XA/XI/XM and because XM in particular needs to work with
    both old and new versions of system Mono, we need to make sure these functions
    still exist.

commit 33cc3d5992241a88928637589f37bc47704e8c3d
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 20 20:07:47 2017 +0200

    [profiler] Rename mono_profiler_install to mono_profiler_create.

commit b19ed506990bfc7d0aefe99f686dece163d4fd38
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Mon Jul 17 21:02:38 2017 +0300

    [runtime] Fix abort ignore when suspended in first instruction from finally block

commit 1f2abf1368a33db69a6c56dbac19e61d22ca6f67
Author: Bernhard Urban <bernhard.urban@xamarin.com>
Date:   Thu Jul 20 19:24:11 2017 +0200

    [jit] test builtin types (mono#5208)

    * [builtin-types] import test suite

    List of original contributors:

    Zoltan Varga <vargaz@gmail.com>
    Rodrigo Kumpera <kumpera@gmail.com>

    * [builtin-types] import updated definitions from xamarin-macios

    https://github.com/xamarin/xamarin-macios/blob/8fbbfa5ca7154fcfd553f7a7b242ffee9a95f240/src/NativeTypes/Primitives.tt

    * [builtin-types] make regression suite work

    * [builtin-types] disable broken tests

    * [fixup] disable failing tests on arm64

commit 0b5298cc37bdd9fb38619595eda6c9825cff9242
Author: Bernhard Urban <bernhard.urban@xamarin.com>
Date:   Tue Jul 18 19:11:48 2017 +0200

    [interp] reuse finally_ips infrastructue for fault clauses

commit 8b57eda5b968beeb3bc2e5e0c58c03d5d23f989f
Author: Mikayla Hutchinson <m.j.hutchinson@gmail.com>
Date:   Tue Jul 18 20:02:12 2017 -0400

    Tweak the Unreal profile

commit ecbca063e5053f265728d89c61979400d2beb014
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Tue Jul 4 18:59:05 2017 +0300

    [sgen] Fix function signature

commit c250236275e404f8619c299f9a2231a57b74e364
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Sat Jun 24 23:40:48 2017 +0300

    [sgen] Compact allocated block list

    It helps with its repeated traversal and improves work distribution when using parallel modes.

commit ebbe4b609b4f031a75ee0b684e78eaea517bf981
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Fri Jun 23 23:09:05 2017 +0300

    [sgen] Improve card table parallelization

    Improve caching by scanning consecutive blocks and avoiding full block list travesal.

commit 60c0d0895f2b68e648e34c2dd2cbd5e28f9c4d5e
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Tue Jul 4 00:14:15 2017 +0300

    [sgen] Run a single worker cycle in major parallel finish case

    This was not the case when we were doing a forced concurrent finish.

commit d3899600cc5f027380c79aaa062aab2cd4e21891
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Sat Jul 1 01:53:36 2017 +0300

    [sgen] Avoid logging unnecessary binary protocol events

commit f3b1c9f69a8cef29302593b97238fff7005903c7
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Sat Jul 1 01:47:46 2017 +0300

    [sgen] Add explicit binary protocol stats for collections

    Using the cardtable scan and finish_gray_stack start and end events is cumbersome to parse and require a lot of logging, especially in the case of the parallel collector.

commit 7ef45635a1ef9ed243494ca9f1f91de8b3d9dc75
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Sat Jul 1 00:01:52 2017 +0300

    [sgen] Include mod union times to stats

commit 3af9da1665d66a9d0fa817b154356d0ae2bc2bab
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Wed Jun 28 13:12:59 2017 +0300

    [sgen] Use parallel minors for pause mode

    It should makes pauses less influenced by workload spikes

commit b489fa800e3940a6cc294c73a934d1045e4f0916
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Wed Jun 28 01:41:22 2017 +0300

    [sgen] Avoid waiting for workers to report their own finish

    If a worker is stuck doing work in another context, it might not be very responsive in transitioning its own state from WORK_ENQUEUED to WORKING and finally to FINISHING. When joining worker threads, we check whether we have any threads working in the corresponding context and, if there aren't any, change their state directly from the gc thread.

    We can do this because work is distributed from centralized pools (worker_distribute_gray_queue and the job_queue), instead of per worker. Therefore we don't need all the workers to perform actual work in the context.

commit d18468a9994cfe44b13295d98f0d0c846f3eb8d3
Author: Marek Safar <marek.safar@gmail.com>
Date:   Thu Jul 20 11:42:01 2017 +0200

    Update CODEOWNERS

commit cae6a24f8cebdb69e4e9006a23a9e25d1bcc2406
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 20 02:23:17 2017 +0200

    [acceptance-tests] Don't mark msbiology as a failure if it OOMs on 32-bit.

    This is known to happen on some platforms.

commit eddfc704c8175435a999a7a78a6cf9191d8a9aa3
Author: Ludovic Henry <ludovic@xamarin.com>
Date:   Wed Jul 19 17:50:07 2017 -0400

    [threads] Add checks around libc calls (mono#5240)

commit 2011cdfdac553271eb3675263ea6ccae3a025396
Author: Ludovic Henry <ludovic@xamarin.com>
Date:   Wed Jul 19 17:49:20 2017 -0400

    [threads] Make mono_thread_detach_internal static (mono#5241)

commit ee0220615ddc0d576ac75355420b0eacafbb4569
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Wed Jul 19 21:32:21 2017 +0200

    [acceptance-tests] Further increase the individual test timeout in the profiler stress runner.

    It seems ironjs-v8 takes even longer to run on ARM than fsharp, msbiology, and roslyn.

commit f62fb052d438f4c32c2e206177b453830d4990c3
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Wed Jul 19 15:03:58 2017 -0400

    [bcl] Fix the parallel build in the tools dir. (mono#5236)

commit ae1674223307fadedffc3bcfa81b9ef5922881fc
Author: Bernhard Urban <bernhard.urban@xamarin.com>
Date:   Wed Jul 19 15:33:00 2017 +0200

    [offset-tool] fix assignment for GeniOS

    fixes this compilation error

    MonoAotOffsetsDumper.cs(279,59): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

commit 769b4cd6c152919619ef12abe2f48af065607b9f
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Wed Jul 19 00:21:32 2017 -0400

    [btls] Remove create-object-library.sh script which is no longer used. (mono#5232)

commit cef757e9f723b42990d3bc966987ba28808307ca
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Wed Jul 19 01:13:40 2017 +0200

    Fix build of "unreal" profile

commit 6b541e91da2c3d2bd37218e2cf06042e7b4a2ce0
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Tue Jul 18 10:04:29 2017 +0200

    [acceptance-tests] Increase individual timeout of profiler stress tests to 8 hours.

    fsharp, roslyn, and msbiology take a very long time to run on ARM. Hopefully this is enough.

commit 28d893d6e9523e2d602fa3059161e6fd2760d83a
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Tue Jul 18 02:21:59 2017 -0400

    [llvm] Disable an optimization in LLVM where we deleted and recomputed the MONO_INST_INDIRECT flags during codegen. This doesn't work since the INDIRECT flag prohibits the insertion of phi nodes, so its later removal leads to the generation of LLVM IR which is missing phi nodes. (mono#5227)

commit 2655a6c49ad1ac854b6c6ab6980493e71ecbaaec
Author: Ankit Jain <ankit.jain@xamarin.com>
Date:   Mon Jul 17 20:19:10 2017 -0400

    [msbuild] Bump msbuild, fix build breakage

commit 2cb00d84154c60534066aa08facb66e123b15af6
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 17 19:14:02 2017 -0400

    [llvm] Set the MonoJitInfo.from_llvm flag for methods loaded from llvm, it got broken by 1debf39. (mono#5223)

commit ebe5850a200bf044e65c2392411d1b9cf15d619e
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Mon Jul 17 18:54:59 2017 -0400

    [offsets-tool] Add a --gen-ios argument which can be used together with --targetdir= to generate ios offsets without having to specify the macos path. (mono#5218)

commit dd757c16b07af35edda16aa461254f75e343e588
Author: Ankit Jain <ankit.jain@xamarin.com>
Date:   Mon Jul 17 17:56:11 2017 -0400

    [msbuild] Bump msbuild to fix build breakage

    .. specifically get msbuild@81687aa7dd4ad9b76c52c1efa841b4527e0f45f9

commit 06f8c75c84c8faa34e196a24a4319b69203aa027
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Mon Jul 17 23:03:36 2017 +0200

    [profiler] Fix a crash in the AOT profiler when the output option isn't given.

commit d615b38eaa0ff5dee66dd7aa488c88d46ab85762
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Mon Jul 17 22:59:26 2017 +0200

    [mini] Support loading multiple profilers with the --profile option.

    The runtime has ~always supported having multiple profilers loaded, so it
    didn't make much sense that only the last --profile option given would be used.

commit 436788b090ac7b9c1ac48e2d0c613427fc742054
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Mon Jul 17 22:47:30 2017 +0200

    [Mono.Profiler.Log] Remove coverage event support.

    I intend to move code coverage support to a separate profiler module, so these
    events will eventually be removed from the log format. As such, I'd rather not
    commit to having these event classes in the API.

    This won't affect users of the library who don't enable code coverage.

commit f480afbd75dd054d062e72ea12b23c28f28ff713
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Mon Jul 17 22:43:42 2017 +0200

    [profiler] Profiler entry point name must now include the module name.

    So mono_profiler_init becomes e.g. mono_profiler_init_log.

    This allows us to link together multiple profilers into a single module and
    load them selectively. This is especially useful for XA/XI/XM.

commit 2b3979bbfc4cf0c00e0e51f6d03f7c41d472bde2
Author: Ankit Jain <ankit.jain@xamarin.com>
Date:   Mon Jul 17 13:34:31 2017 -0400

    [msbuild] Bump to get new changes on xplat-master

commit d6f9286f7e7b16ecb9281ceb483fff22edcee69c
Author: Vladimir Kargov <kargov@gmail.com>
Date:   Wed Jun 7 19:32:42 2017 -0700

    [jit] Don't allocate a new method in mono_get_method_constrained_checked, check the cache first.

commit cc441198209ac24991380dcd1058a344a73bbe8b
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Fri Jul 14 00:36:19 2017 +0200

    [profiler] Don't call mono_gc_base_init () before loading profilers.

    Calling this function could cause us to miss some profiler events.

    In the past, we needed to call this function so that SMR and mono-threads were
    initialized. Since then, 8dec984 changed
    profiler initialization to happen later during startup, so this is no longer
    necessary.

commit fc5bb8cea80a2b952ea13120424ec0ee9efc7e66
Author: Albert Ruff <albertruff@outlook.de>
Date:   Mon Jul 17 18:30:44 2017 +0200

    Add SoapAction to Content-typ for SOAP 1.2 (mono#5219)

commit a0516dd1255ddda97ec5128a3fc7e935721b6d0a
Author: monojenkins <jo.shields+jenkins@xamarin.com>
Date:   Mon Jul 17 17:38:53 2017 +0200

    [msvc] Update csproj files (mono#5220)

commit c7b855870946c210e05ac325c5964c6fa2d717b0
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Sun Jul 16 19:59:41 2017 +0200

    Bump corefx (mono#5217)

commit 6ed5ac6a9439d156fb8ac430d2a2ce8fe80ad193
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Sun Jul 16 02:43:10 2017 +0200

    [System] Suppress a few instances of CS0618 obsolete warnings

commit b171aad801195b743aa43c718135451eaa7995e2
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Sun Jul 16 01:49:00 2017 +0200

    [corlib] Preserve List<T>.ConvertAll in TypeTest (mono#5215)

    TypeTest.GetGenericMethodDefinitionOverInflatedMethodOnGTD accesses
    List<T>.ConvertAll() via reflection but doesn't use the method
    elsewhere so the linker can remove it. Added some usage to avoid that.

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

commit 608127e4040891f33bcc63ba76109383eaf675f6
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 15 23:13:37 2017 +0200

    [profiler] Use g_strerror () instead of strerror ().

commit 2494a1f8b102371fbf04c1b9cb46d1b45b9e568c
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 15 22:55:08 2017 +0200

    [profiler] Change sample frequency to a 32-bit int.

    The unit is hertz, so values above 100-1000 are already extremely unusual.
    Changing it to a 32-bit int avoids word tearing on 32-bit platforms.

commit 7788b6c187063cc1e0ea013c646906af78bf7ad7
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 15 19:43:38 2017 +0200

    [profiler] Introduce runtime control API.

commit 3a5fd7784a2465b7d2db49fa51dd4167b903ef05
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 15 02:12:38 2017 +0200

    [profiler] Move heapshot logic to the correct GC event.

    MONO_GC_EVENT_START is actually sent _after_ all the 'stop world' events. The
    heapshot logic being in this switch case only worked by accident previously.

commit 5db4667d14369f8ce8cf9796442654cd465582cc
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Sat Jul 15 02:08:40 2017 +0200

    [profiler] Clean up MonoProfilerGCEvent enum.

    * Remove the mark/reclaim events as they've been broken for a long time and
      aren't particularly useful.
    * Reorder the enum member declarations to the order they actually arrive in.

commit e079ffccdd3ef117393946e1f71a8dc4a8a8d028
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Fri Jul 14 23:38:31 2017 +0200

    [bcl] Remove the ValueAdd and InetAccess NUnit categories (mono#2212)

    ValueAdd was added over a decade ago and all the tests marked with this category are passing now.

    We have *tons* of tests that rely on working DNS/Internet that aren't marked with
    InetAccess (and they actually provide good value so we don't want to exclude them).

    Since these categories don't really make sense and just causes confusion
    it's better to just remove them.

commit 51592f79acb60663e75de3d96cfc375b59e5ec2b
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Fri Jul 14 20:30:15 2017 +0200

    [profiler] Add a heapshot-on-shutdown option.

commit e2efcaae31068cac361143a2829483c23b58450a
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Fri Jul 14 12:58:08 2017 -0400

    [pedump] Print failure cause message when a class cannot be initialized

commit 9253f871c8fd8b7bd55390b592406f22d2559fdb
Author: Ludovic Henry <ludovic@xamarin.com>
Date:   Fri Jul 14 15:59:12 2017 -0400

    Add @luhenry and @kumpera to CODEOWNERS for some files

commit 78b6168710ad699df35f4f25f5f9e0d9e72a4875
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Fri Jul 14 15:39:16 2017 -0400

    [llvm] Reserve the proper number of got entries in the llvm got instead of 16 which used to be enough in the past. Hopefully fixes #56111. (mono#5207)

commit 77554f1d72d548c6acecdbf69952566dbadf94da
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Thu Jul 13 15:54:12 2017 -0400

    [metadata] Encode public key length correctly for keys longer than 128 bytes

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

    For keys longer than 1024 bits, we encoded the length incorrectly as
       0x80 (length & 0xff)
    instead of the correct algorithm:
      if (length < 0x80)
        length
      else if (length < 0x4000)
        0x80|(length>>8) (length & 0xff)
      else
        0xc0|(length>>24) (length>>16)&0xff (length>>8)&0xff length&0xff

    which is provided by mono_metadata_encode_value.

    See ECMA-335 II.24.2.4 #US and #Blob heaps

    N.B.: we now always allocate the memory for the key as (keylen + 4) which
    over-allocates by a couple of bytes in the cases where the key is shorter.

commit b09b8562caf4a54e9cd4ee05158a45775b56d6e5
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Thu Jul 13 19:02:10 2017 -0400

    [tests] Add regression test for InternalsVisibleTo with long PublicKey

    Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57691

    We build a library that has an InternalsVisibleTo attribute that references an
    executable that is signed with a long (>128bytes) public key.  Previously we
    were using an incorrect method of encoding the key length.

commit 4384e52e6572aab5aaf6abc65b21215de780e3dd
Author: Aleksey Kliger <aleksey@xamarin.com>
Date:   Thu Jul 13 17:38:25 2017 -0400

    [tests] Use test runner for test-internalsvisibleto

    Also add the source files to EXTRA_DIST

commit 5502797616d39d59163bc49e6c1356d6f39337af
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Fri Jul 14 20:27:08 2017 +0200

    [Microsoft.Build] Relax check in BuildSubmissionTest a bit more

commit 578bfa2d0592a91eb867f7721ab7d378252a4f1d
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 19:01:09 2017 +0200

    [Mono.Profiler.Log] Fix LogProcessor.ReadObject ().

commit c1f4cebc65eb0d656e1feab771d8d2c61268a25b
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 18:31:59 2017 +0200

    [msvc] Update VTune project files.

commit e7e24988fa758d25be8c17b715bc1a35ff3976ed
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 17:37:22 2017 +0200

    [profiler] Fix sampling thread shutdown logic to handle idle mode correctly.

commit f9d7d369e9f2e4feb0ada4602eb16afa4d99e7a1
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 15:30:37 2017 +0200

    [profiler] Use tabledefs.h constants for method attributes.

commit 5912ed9d42ccbdf5b51d048c3df4762c9ad44e6e
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 15:02:06 2017 +0200

    [profiler] Move the log format description to the header.

commit a972b72361aa1eee63f25806260aaec8f7ab2417
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 13:54:39 2017 +0200

    [acceptance-tests] Update the profiler-stress runner for removed options.

commit 3765a70beea9d3b031aec05778e6a6357fac4159
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 13:37:27 2017 +0200

    [profiler] More options reworking/refactoring.

    This commit does a few different things.

    First, metadata event options have been removed. We now always emit these
    events. This is done because they contain important data that must be present
    in order for dynamic event mask changes at runtime to result in useful data.
    Also, almost all uses of the profiler require this data to be present, so
    letting it be turned arguably just adds confusion for users.

    Second, the PROFLOG_*_FEATURE flags have been removed. These made the code a
    bit confusing because it was unclear whether code in log.c should be checking
    the PROFLOG_*_FEATURE flag or the PROFLOG_*_EVENTS flag for a particular kind
    of event. For heapshot in particular, the heapshot mode is now a separate enum
    configuration variable. For enter/leave and coverage, switching those on and
    off in the log profiler at runtime is not something we want to support at this
    time.

    As a result of the above change, some options are now processed manually rather
    than being part of the event_list array.

    Third, the way we turn off GC root events when needed is now by setting the
    callback to NULL. This is more efficient as it signals to the runtime that it
    doesn't have to gather root information. This will especially matter later on
    when the profiler root info revamp lands, as it collects a lot more data than
    we do today. Also, GC roots are no longer gathered unless we're doing a
    heapshot.

    Fourth, the profiler now always starts the sampling thread in idle mode. This
    is so that we can reconfigure and enable/disable it at runtime as needed.

    Finally, the alloc alias option now includes GC move events, and GC resize
    events are only emitted if the gc option is given.

commit 13661ada16fb0a42444a11786cbdb2e14634a883
Author: Ludovic Henry <ludovic@xamarin.com>
Date:   Fri Jul 14 10:58:25 2017 -0400

    [w32error] Add ENXIO error case (mono#5199)

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

commit 086a9b3d095e3aeb3fec6fd34700c2868c8a1675
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Fri Jul 14 14:47:14 2017 +0200

    [Microsoft.Build] Make BuildSubmissionTest.EndBuildWaitsForCompletion more reliable (mono#5209)

    We've seen this test failure a few times:

    ```
    MESSAGE:
      #2
      Expected: greater than or equal to 00:00:01
      But was:  00:00:00.9544900

    +++++++++++++++++++
    STACK TRACE:
      at MonoTests.Microsoft.Build.Execution.BuildSubmissionTest.EndBuildWaitsForSubmissionCompletion () [0x000d8] in /mnt/jenkins/workspace/test-mono-mainline-linux/label/ubuntu-1404-amd64/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/BuildSubmissionTest.cs:110
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /mnt/jenkins/workspace/test-mono-mainline-linux/label/ubuntu-1404-amd64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
    ```

    Rewriting the test to use Stopwatch instead of DateTime
    for measuring elapsed time should make it more reliable.

commit 447849c1f691f91b9fc717e88a9ca6f48f8b26fe
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 10:45:59 2017 +0200

    [profiler] Clarify docs for mono_profiler_set_sample_mode ().

commit d1b3abe7cce40066f07f67155bbbffa6d7d0ae81
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 20:16:31 2017 +0200

    [profiler] Use mono_cpu_count () from utils/proclib.

commit 99147c5a0f4876203d7df67e2f83b518793af609
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 20:16:03 2017 +0200

    [utils/proclib] Export mono_cpu_count () for use in the profiler.

commit 1a62e50ebcb93715dfe5d2912cf094ed51e60300
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 20:05:40 2017 +0200

    [profiler] Update file headers.

commit 5ca9255067d3db3455c1f1c2374eba8d6a32ccdd
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 20:00:06 2017 +0200

    [profiler] Use EXIT_LOG instead of EXIT_LOG_EXPLICIT where possible.

commit c1344060eb00c36244b7d9e566e160f5724abbd0
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 17:59:27 2017 +0200

    [profiler] Clean up counter data structures a bit.

commit 931dd57d68b927e40edba565017015fe87b75776
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 17:37:34 2017 +0200

    [profiler] Consolidate log profiler state.

    Previously, the profiler's state was spread all over the place. Some stuff was
    in the MonoProfiler structure, some stuff was in global variables littered
    throughout log.c. Now everything is stored in MonoProfiler and ProfilerConfig.

commit 6fbc9889799d04f8e8b6f2b8e2b109ab5f967275
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 16:06:11 2017 +0200

    [profiler] Drop support for the old-style sample option.

commit db44095bc562c0384ee28efcbb48976ed1ed71ef
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 15:32:37 2017 +0200

    [profiler] Remove the need to pass a MonoProfiler pointer around everywhere.

commit 799eccba7bb76e93c0c9e7aec039974351464338
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 15:22:00 2017 +0200

    [profiler] Clean up logging to use the new logging functions.

commit b4349010700f65c05095fcda1a0db38a5497f6f5
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 15:21:22 2017 +0200

    [profiler] Remove support for the output=-FILENAME option.

commit 7231cb1bb2394ee630e3711de3fc177682492b8e
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 15:15:46 2017 +0200

    [profiler] Remove the debug-coverage option.

commit 31e0069912cec310e1ce1bfc7e962722869cff95
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 15:07:51 2017 +0200

    [utils/logger] Export logging functions for the profiler.

commit c72788c0e4692186cea3245a5b1f0fdcf9732ae8
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 12:43:23 2017 +0200

    [profiler] Use explicit values for enum members.

commit 3cff09735c41d9c7d105241e9a9531651ea18969
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 12:43:08 2017 +0200

    [profiler] Remove unused TYPE_END enum member.

commit 6dfe0b0a160f32b187f04b815ccc6642b6559400
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Wed Jul 12 12:35:44 2017 +0200

    [profiler] Update sample hit size calculation.

commit f3053047ccb1984a05c8432eb5f2cebf0c518c27
Author: Zoltan Varga <vargaz@gmail.com>
Date:   Fri Jul 14 00:43:23 2017 -0400

    [llvm] Add support for fault clauses. Fixes #58114. (mono#5203)

commit 279614fb57443c5150d0131f6fb9993ae1c8b515
Author: Alexander Köplinger <alex.koeplinger@outlook.com>
Date:   Fri Jul 14 01:36:44 2017 +0200

    Add myself to a few paths in CODEOWNERS

    Also fix a few broken markdown links in contributing.md that that I noticed.

commit 9d990d942a8ee9b9a670a5e657517db3a819207a
Author: Jonathan Pryor <jonpryor@vt.edu>
Date:   Thu Jul 13 12:51:19 2017 -0700

    @jonpryor reviews Mono.Options (mono#5204)

commit e646e0f5001264362caf7b8cb8337ce054064b94
Author: Alex Rønne Petersen <alexrp@xamarin.com>
Date:   Thu Jul 13 18:30:39 2017 +0200

    Add initial CODEOWNERS file.

commit 11003a437522840f62bc9ea84350eb1057c2484e
Author: Andi McClure <andi.mcclure@xamarin.com>
Date:   Mon Jul 10 17:01:12 2017 -0400

    Do not major_free_swept_blocks on Orbis.
    Also, the existing major_free_swept_blocks exemption for Windows is more appropriate for Windows *hosts* than Windows *targets*.

commit 37d42e13b04c4a78928f7e20ef29128d61e6c8e9
Author: Vlad Brezae <brezaevlad@gmail.com>
Date:   Tue Jun 27 23:52:04 2017 +0300

    [sgen] Make job waiting reliable

    While this is not an issue yet, sgen_thread_pool_wait_for_all_jobs is logically expected to be called by the main thread and resume execution after all jobs have been executed. Concurrent M&S can enqueue additional jobs as part of its finishing phase, which means that we could detect early that no more jobs are to be processed. Make sure this is not the case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment