Rodrigo Kumpera [Thu, 30 Jul 2015 14:48:44 +0000 (10:48 -0400)]
Merge pull request #1840 from ludovic-henry/iolayer-thread-interrupt
[runtime] Implement wait interrupt in thread info, instead of in the io-layer
Martin Baulig [Thu, 30 Jul 2015 13:28:28 +0000 (15:28 +0200)]
[System]: Fix WebConnectionStream.SetHeadersAsync() logic for #31830.
This fixes commits
8ccfe0f8ff71d18151f8aad90d0855dfd2d2a723 and
c109f9ca03d38e608cbd85cb2fdf8cfaf55bb97c.
Added new test:
https://github.com/xamarin/web-tests/commit/
d60bc3f637ca2bf4aa1379b839d878e224d344c8
(cherry picked from commit
c133880bc407baed5d46222e20677d1427b32b4d)
Neale Ferguson [Thu, 30 Jul 2015 11:09:37 +0000 (07:09 -0400)]
Add missing {
Zoltan Varga [Thu, 30 Jul 2015 03:04:42 +0000 (23:04 -0400)]
[amd64] Allocate stack space for saving argument registers in the sdb trampoline code on winx64.
Zoltan Varga [Thu, 30 Jul 2015 02:43:05 +0000 (22:43 -0400)]
[amd64] Allocate stack space for saving argument registers in the generic trampoline code on winx64.
Zoltan Varga [Thu, 30 Jul 2015 02:29:10 +0000 (22:29 -0400)]
[jit] Avoid emitting the DW_CFA_mono_advance_loc mono extension opcode into the .debug_frame section.
Vlad Brezae [Thu, 30 Jul 2015 02:08:18 +0000 (19:08 -0700)]
Merge pull request #1929 from BrzVlad/feature-unwind4yall
Feature trampoline unwind info
Vlad Brezae [Wed, 15 Jul 2015 23:40:29 +0000 (23:40 +0000)]
[arm] Provide unwind info for tls thunks
We don't try to unwind from the fallback thunks since they call external code anyway.
Vlad Brezae [Wed, 15 Jul 2015 22:43:09 +0000 (22:43 +0000)]
[arm] Simplify declaration of global symbols in asm
Vlad Brezae [Fri, 19 Jun 2015 00:55:46 +0000 (17:55 -0700)]
[arm] Fix unwind info for managed methods
Add unwind information for the epilog.
Vlad Brezae [Mon, 15 Jun 2015 23:23:18 +0000 (16:23 -0700)]
[aot] Provide unwind info for plt trampolines
Vlad Brezae [Thu, 11 Jun 2015 00:58:25 +0000 (00:58 +0000)]
[arm] Add unwind info for trampolines
Vlad Brezae [Fri, 15 May 2015 22:57:15 +0000 (15:57 -0700)]
[x86] Add unwind info for registered trampolines.
Vlad Brezae [Fri, 8 May 2015 23:23:56 +0000 (16:23 -0700)]
[amd64] Add unwind info for registered trampolines.
Zoltan Varga [Wed, 29 Jul 2015 22:29:24 +0000 (18:29 -0400)]
Remove an obsolete comment.
Zoltan Varga [Wed, 29 Jul 2015 22:15:37 +0000 (18:15 -0400)]
Revert "Report XDG Documents directory for SpecialFolder.MyDocuments"
This reverts commit
d6553bc988dd9f2a3c535c6075868f233ecd3302.
Revert this as it breaks the build.
Vlad Brezae [Sat, 6 Jun 2015 01:13:04 +0000 (18:13 -0700)]
[runtime] Register tramp jit info to the corresponding domain
Vlad Brezae [Fri, 12 Jun 2015 00:45:45 +0000 (17:45 -0700)]
[x86] Register throw trampolines
Vlad Brezae [Tue, 2 Jun 2015 20:58:53 +0000 (13:58 -0700)]
[runtime] Register unbox trampolines
Vlad Brezae [Fri, 10 Jul 2015 20:57:23 +0000 (13:57 -0700)]
[arm] Register and add unwind information for page trampolines.
Vlad Brezae [Tue, 2 Jun 2015 19:04:38 +0000 (12:04 -0700)]
[runtime] Register imt trampolines
Vlad Brezae [Tue, 2 Jun 2015 19:02:47 +0000 (12:02 -0700)]
[runtime] Register get gsharedvt arg trampolines
Vlad Brezae [Tue, 2 Jun 2015 18:48:46 +0000 (11:48 -0700)]
[runtime] Register static rgctx trampolines
Vlad Brezae [Tue, 12 May 2015 20:38:37 +0000 (13:38 -0700)]
[runtime] Register tramp infos for delegate invoke trampolines
Also refactor MonoTrampInfo creation, similar to the other trampolines.
Vlad Brezae [Wed, 15 Jul 2015 01:59:43 +0000 (18:59 -0700)]
[x86] Fix usage of virtual delegate invoke tramps for aot
We need to fallback if the vtable slot exceedes the limit.
Vlad Brezae [Wed, 15 Jul 2015 01:53:59 +0000 (18:53 -0700)]
[runtime] Fix lookup of aot symbol for imt delegate invoke tramps
Offset for calls through imt is negative
Vlad Brezae [Wed, 15 Jul 2015 02:49:34 +0000 (19:49 -0700)]
[runtime] Add missing delegate invoke trampolines
Vlad Brezae [Wed, 15 Jul 2015 01:45:35 +0000 (18:45 -0700)]
[amd64] Fix failure to emit imt delegate invoke tramps
The problem was due to implicit casting of the dividend to unsigned (which overflows) when divided by unsigned.
Vlad Brezae [Thu, 9 Jul 2015 23:52:46 +0000 (16:52 -0700)]
[aot] Register tramp infos when loading trampolines in aot.
Vlad Brezae [Wed, 29 Apr 2015 00:51:45 +0000 (17:51 -0700)]
[runtime] Expose trampoline jit infos that have unwind info to the runtime
Some trampolines cannot have typical unwind information because they don't get the return address from the stack. Others are called from native code that doesn't have a managed-to-native transition so unwind information would be pointless at this point. We don't include these in the jit info tables for now, not to confuse the runtime further more.
Vlad Brezae [Thu, 7 May 2015 22:08:44 +0000 (15:08 -0700)]
[runtime] We already checked that the IP is within the clause
Vlad Brezae [Fri, 24 Apr 2015 21:03:13 +0000 (14:03 -0700)]
[jit] Add different frame type for trampoline frames.
Vlad Brezae [Fri, 24 Apr 2015 19:02:47 +0000 (12:02 -0700)]
[jit] Include the unwind_info into the tramp JitInfos
Zoltan Varga [Wed, 29 Jul 2015 21:51:33 +0000 (17:51 -0400)]
[llvm] Avoid emitting a dummy personality function.
Rodrigo Kumpera [Wed, 29 Jul 2015 21:26:06 +0000 (17:26 -0400)]
Merge pull request #1951 from akoeplinger/fix-monop
[monop] Set MONO_PATH when running tests so class libs are found
João Matos [Wed, 29 Jul 2015 21:14:46 +0000 (22:14 +0100)]
Merge pull request #1953 from brpocock/master
Report XDG Documents directory for SpecialFolder.MyDocuments
João Matos [Wed, 29 Jul 2015 21:08:48 +0000 (22:08 +0100)]
Merge pull request #1954 from kumpera/fix_aot_compilation
Fix OSX aot compilation when there's a space in a file path.
Rodrigo Kumpera [Wed, 29 Jul 2015 21:05:17 +0000 (17:05 -0400)]
Fix aot compilation when the path has spaces.
Sebastien Pouliot [Wed, 29 Jul 2015 20:45:15 +0000 (16:45 -0400)]
[tests] iOS9 (beta) have fixed bug #27864, adjust test
Bruce-Robert Fenn Pocock [Wed, 29 Jul 2015 20:02:43 +0000 (16:02 -0400)]
Report XDG Documents directory for SpecialFolder.MyDocuments
Rodrigo Kumpera [Wed, 29 Jul 2015 16:04:37 +0000 (12:04 -0400)]
[runtime] Use MONO_SIZEOF_TYPE instead of sizeof (MonoType) and compiler generated copying.
On amd64 MONO_SIZEOF_TYPE is 12 and sizeof(MonoType) is 16. This leads to memory corruption
if one uses sizeof instead of the specific size.
This is one of those oddball behaviors of the runtime that makes easy things very hard. :(
Rodrigo Kumpera [Tue, 28 Jul 2015 18:14:47 +0000 (14:14 -0400)]
[runtime] Introduce mono_method_get_wrapper_cache to fetch the right wrappers set for a given method.
This removes a ton of duplicated code around the runtime. There are still a few cases that could not be
unified due to the hashtables been initialized differently, which requires further reviewing.
Rodrigo Kumpera [Tue, 28 Jul 2015 16:09:42 +0000 (12:09 -0400)]
[runtime] Use a single function to free the contents of MonoWrapperCaches. Remove duplicated code.
Marek Safar [Wed, 29 Jul 2015 10:14:38 +0000 (12:14 +0200)]
[corlib] Fix out of range FileStream position error message
Marek Safar [Tue, 28 Jul 2015 22:18:39 +0000 (00:18 +0200)]
[mcs] Report error for missing win32 icon.
Marek Safar [Tue, 28 Jul 2015 22:07:30 +0000 (00:07 +0200)]
[xbuild] Use correct property for Win32Icon. Fixes #32499
Zoltan Varga [Tue, 28 Jul 2015 21:03:58 +0000 (17:03 -0400)]
[llvm] Emit the file info struct initializer using the proper types.
Zoltan Varga [Tue, 28 Jul 2015 20:49:47 +0000 (16:49 -0400)]
[amd64] Avoid saving r11 outside the red zone in the generic trampoline code.
Alexander Köplinger [Tue, 28 Jul 2015 20:17:54 +0000 (22:17 +0200)]
[monop] Set MONO_PATH when running tests so class libs are found
When the monop tests were added in
6c9ad41d85a668550d0d6077cd3f7d504fe6b6eb the MONO_PATH
variable wasn't included. This means that the tests actually ran against the system-provided
Mono class libs instead of the in-tree versions (or failed in case of CI with only monolite).
Martin Baulig [Tue, 28 Jul 2015 17:06:08 +0000 (19:06 +0200)]
Revert "[System] Don't assume WebConnectionStream of unknown http methods require write stream. Fixes #31830"
This reverts commit
8ccfe0f8ff71d18151f8aad90d0855dfd2d2a723.
This commit breaks the Content-Type logic for existing HTTP verbs such as for instance
using DELETE with an empty body [1]. Added two new test cases [2] and [3] to the stable
branch of the web-tests (https://github.com/xamarin/web-tests/tree/stable) for the particular
scenario from bug #31830 as well as the default HttpClient.SendAsync() without a Content [4].
The rules are as follows:
1.) HttpWebRequest adds the Content-Length header if and only if you're calling
GetRequestStream(); a length of 0 will be used if you don't actually write
any content.
This is true for POST, PUT, DELETE and "obscute" verbs.
2.) HttpClient.SendAsync() always adds a Content-Length header.
Tests:
[1] https://github.com/xamarin/web-tests/blob/
31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestPost.cs#L84
[2] https://github.com/xamarin/web-tests/blob/
31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestPost.cs#L296
[3] https://github.com/xamarin/web-tests/blob/
31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestHttpClient.cs#L134
[4] https://github.com/xamarin/web-tests/blob/
31b8fed0ec1283b8c0693bb14d1ac266792c1020/Xamarin.WebTests/Xamarin.WebTests.Tests/TestHttpClient.cs#L127
(cherry picked from commit
3f1ae72f1b385c3c5e4b5ac2b93d13418c020f02)
Zoltan Varga [Tue, 28 Jul 2015 18:01:23 +0000 (14:01 -0400)]
[runtime] Remove some dead code.
Zoltan Varga [Tue, 28 Jul 2015 17:21:15 +0000 (13:21 -0400)]
[runtime] Print an error message instead of asserting when encountering an old corlib.
triton [Tue, 28 Jul 2015 13:54:01 +0000 (14:54 +0100)]
[mini] Fixed void function returning warning.
triton [Tue, 28 Jul 2015 13:53:11 +0000 (14:53 +0100)]
[msvc] Update Mono DLL export definitions.
triton [Tue, 28 Jul 2015 13:52:31 +0000 (14:52 +0100)]
[msvc] Update Visual Studio project files.
Marek Safar [Tue, 28 Jul 2015 12:56:45 +0000 (14:56 +0200)]
[mcs] Do member declaration obsolete types references check after all members are defined. Fixes #32451
Alexander Kyte [Wed, 13 May 2015 08:03:53 +0000 (08:03 +0000)]
[runtime] Remove mono_marshal_free_inflated_wrappers because its only call site frees the caches anyways.
Since we now only remove methods from caches in the image set it belong we no longer needs to do it since
they will be gone together with the method itself.
Alexander Kyte [Tue, 12 May 2015 16:15:41 +0000 (16:15 +0000)]
[runtime] Move caches present in both MonoImage and MonoImageSet into an embedded struct.
Alexander Kyte [Mon, 11 May 2015 19:21:43 +0000 (19:21 +0000)]
[runtime] Duplicate some more of the image caches in MonoImageSet
Changes by Rodrigo Kumpera:
Added missing freeing code.
Fixed insertion into runtime_invoke_direct_cache.
Fixed some of the cleanup in mono_marshal_free_inflated_wrappers.
Alexander Kyte [Wed, 13 May 2015 06:26:59 +0000 (06:26 +0000)]
[runtime] Removed confusing/cross-cutting function mono_method_inflated_lookup and inlined at only call site.
Alexander Kyte [Wed, 6 May 2015 21:56:11 +0000 (17:56 -0400)]
[runtime] Move caches from Images to ImageSets if their keys contain generic types
We currently have a partial ordering of dependencies between ImageSets and images.
If you free an image that an ImageSet depends on, you must free the
ImageSet. The inverse is not true. Freeing the ImageSet does not free
any images.
We had some caches in each Image which used method signatures as keys.
When an image signature refers to a type stored in an ImageSet, and that
ImageSet has been unloaded, the signature will remain in the cache for
the Image.
When we have another object hash to the same slot as this signature, we
must check if the two signatures are actually equal, that is if they are
equal keys or a hash collision. In this check we will refer to the
MonoType in the freed ImageSet.
By moving the caches containing inflated type references into the ImageSets
holding these inflated types, we ensure that the cache items are always safe
to dereference.
Why not simply remove the signatures from all caches they contain on
freeing the signature? This is much more work. A signature with a dozen
type parameters in a dozen images may have been used as a key in any of these
images. We would have to check all caches in all images the signature
refers to. As these caches use open addressing, in the worst time this
can take
```
(# images in signature) x (# caches per image) x (# of slots traversed on average)
```
steps. By placing it on the ImageSet, this takes only the steps required
to free a hash table. It is also easier to reason about.
Changes by Rodrigo Kumpera:
Added locking comments to the new fields in MonoImageSet.
Fixed the selected cache in mono_marshal_get_delegate_begin_invoke, mono_marshal_get_delegate_end_invoke,
mono_marshal_get_delegate_invoke_internal and mono_marshal_get_synchronized_wrapper.
The original code was using the image set of the class instead of the IS of the inflated method. This would
pick the wrong image if the method belonged to a different IS.
Rodrigo Kumpera [Thu, 23 Jul 2015 20:21:41 +0000 (16:21 -0400)]
[marsha] Use TRUE instead of 1 for setting a boolean field.
Alexander Kyte [Thu, 7 May 2015 19:24:00 +0000 (15:24 -0400)]
[runtime] Copy signature return type when copying MonoMethodSignature
This commit also removed an extra signature duplicator living in
marshal.c, so that this fix is used consistently
Zoltan Varga [Tue, 28 Jul 2015 02:35:49 +0000 (22:35 -0400)]
[runtime] Make the code more c++ clean by renaming this->this_obj.
Zoltan Varga [Tue, 28 Jul 2015 02:04:42 +0000 (22:04 -0400)]
[jit] Make the jit code more c++ clean by renaming class->klass and this->this_arg/this_ins.
Zoltan Varga [Tue, 28 Jul 2015 00:59:47 +0000 (20:59 -0400)]
Merge pull request #1950 from akoeplinger/fix-responsefile-win
[build] library.make: Avoid collisions in response file name for facades on Windows
Rodrigo Kumpera [Mon, 27 Jul 2015 23:10:23 +0000 (19:10 -0400)]
Merge pull request #1943 from alexrp/profiler-improvements
Follow-up to #1926
Alexander Köplinger [Mon, 27 Jul 2015 22:17:00 +0000 (15:17 -0700)]
[build] library.make: Avoid collisions in response file name for facades on Windows
When additional facades were added in
04114a5e9d141a4f424564fea95ac4480cb0a16a, the Windows Cygwin build broke.
Turns out, when building the System.IO.Comporession facade assembly it wanted to use the SharpCompress sources
of the real assembly and couldn't find it (which made no sense since since the facade doesn't even list them in
its .sources file).
After inspecting library.make what happens is this: the response file is defined as $(PROFILE)_$(LIBRARY).response,
but this results in the same value for both the real assembly and the facade assembly.
This means that since the real assembly was compiled first, the response file contained the source list of the real
assembly - which was then used to compile the facade (make happily reused the response file since it already existed).
The fix is to put $(LIBRARY_SUBDIR) into the filename so the facade assembly gets a different response file.
Same for the makefrag.
Alex Rønne Petersen [Sat, 25 Jul 2015 18:47:33 +0000 (20:47 +0200)]
[runtime] Add docs for new domain and context API functions.
Zoltan Varga [Mon, 27 Jul 2015 22:25:59 +0000 (18:25 -0400)]
[runtime] Make some headers c++ clean.
Marek Safar [Mon, 27 Jul 2015 18:09:26 +0000 (20:09 +0200)]
[mcs] Fix obsolete checks on resolved types when type is inflated generic type with concrete type arguments.
João Matos [Mon, 27 Jul 2015 15:43:40 +0000 (16:43 +0100)]
Merge pull request #1923 from lukaszunity/start-managed-process-fix
Process.Start fix for managed program
João Matos [Mon, 27 Jul 2015 13:23:28 +0000 (14:23 +0100)]
Merge pull request #1948 from akoeplinger/fix-httplistener-test-race
[System] Fix race condition in HttpListenerTest.ConnectionReuse test
Alexander Köplinger [Mon, 27 Jul 2015 13:17:23 +0000 (15:17 +0200)]
[System] Fix race condition in HttpListenerTest.ConnectionReuse test
There was a race so that sometimes ipEndPoint wasn't yet assigned when the method returned,
which resulted in the test failing like this:
MESSAGE: reuse1
Expected: <127.0.0.1:54370>
But was: null
To fix this the race, we now wait until ipEndPoint is assigned before returning.
The test was actually disabled on Android because of this (see
7cb4cc9c0e61d921c75ab654641a154d12cc8085),
we can reenable it again as it should now work fine.
Marek Safar [Mon, 27 Jul 2015 12:10:13 +0000 (14:10 +0200)]
[mcs] Reset doc reader state after expression bodied property. Fixes #32456
Marcos Henrich [Mon, 27 Jul 2015 11:43:38 +0000 (12:43 +0100)]
Merge pull request #1909 from esdrubal/reflection
[SRE] Implemented missing SRE features.
João Matos [Mon, 27 Jul 2015 10:34:37 +0000 (11:34 +0100)]
Merge pull request #1947 from directhex/fix-kfreebsd
mono-threads-linux.c also applies to other OSes with GNU userland
Marek Safar [Mon, 27 Jul 2015 10:31:29 +0000 (12:31 +0200)]
[build] Remove generated files
Jo Shields [Mon, 27 Jul 2015 08:20:47 +0000 (09:20 +0100)]
mono-threads-linux.c also applies to other OSes with GNU userland
Fixes a build failure for GNU/kFreeBSD (which doesn't use mono-threads-freebsd.c, since GNU/kFreeBSD doesn't have pthread_np.h)
Marek Safar [Mon, 27 Jul 2015 07:09:23 +0000 (09:09 +0200)]
Merge pull request #1941 from kasthack/system.web-fixes
[System.Web] Abstractions from reference source
Zoltan Varga [Mon, 27 Jul 2015 02:43:30 +0000 (22:43 -0400)]
Merge pull request #1946 from markbeaton/markbeaton-tzaustralia
GetSystemTimeZones() not returning Australia zones
Mark Beaton [Mon, 27 Jul 2015 01:59:49 +0000 (11:59 +1000)]
GetSystemTimeZones() not returning Australia zones
A call to TimeZoneInfo.GetSystemTimeZones() is not returning any of the timezones for Australia due to the "Australia" string being missing from the array of continents used to look up the zoneinfo data at /usr/share/zoneinfo. This patch adds the "Australia" value to the array.
Alex Rønne Petersen [Fri, 24 Jul 2015 23:36:05 +0000 (01:36 +0200)]
[profiler] Describe buffer size arithmetic with comments.
Marek Safar [Sun, 26 Jul 2015 18:23:09 +0000 (20:23 +0200)]
Merge pull request #1944 from akoeplinger/remove-net40-ifdefs
[bcl] Remove NET_4_0 defines from class libs
Alexander Köplinger [Sun, 26 Jul 2015 01:42:01 +0000 (03:42 +0200)]
[bcl] Remove NET_4_0 defines from class libs
NET_4_0 is always defined now, so the ifdefs are redundant.
I verified the libs are exactly the same after this change, so this is effectively a no-op.
Zoltan Varga [Sat, 25 Jul 2015 19:46:13 +0000 (15:46 -0400)]
Merge pull request #1942 from akoeplinger/net4x
[build] Fix a few Makefiles to correctly use net_4_x instead of net_4_5
Alexander Köplinger [Sat, 25 Jul 2015 15:39:14 +0000 (17:39 +0200)]
[RabbitMQ.Client] Add generated net_4_x-api-*.cs specs files and remove outdated ones
Alexander Köplinger [Sat, 25 Jul 2015 15:35:32 +0000 (17:35 +0200)]
[build] Fix a few Makefiles to correctly use net_4_x instead of net_4_5
Alexander Köplinger [Sat, 25 Jul 2015 15:07:07 +0000 (17:07 +0200)]
[Microsoft.Build] Fix name of framework directory in xbuild-testing RedistList
Fixes the BuildCommonResolveAssemblyReferences test that failed after the net_4_5 -> net_4_x switch.
Zoltan Varga [Sat, 25 Jul 2015 02:12:13 +0000 (22:12 -0400)]
Revert "[jit] Allow NEW_AOTCONST () to work in JIT mode too, use this to simplify some code."
This reverts commit
bf736f6c5938641a77da1941f28c96513c42df38.
Revert this as it seems to break the build.
kasthack [Sat, 25 Jul 2015 01:38:52 +0000 (04:38 +0300)]
[System.Web] Abstractions from reference source
Zoltan Varga [Sat, 25 Jul 2015 01:25:37 +0000 (21:25 -0400)]
[jit] Allow NEW_AOTCONST () to work in JIT mode too, use this to simplify some code.
Zoltan Varga [Sat, 25 Jul 2015 00:38:02 +0000 (20:38 -0400)]
Fix installing resgen.exe.
Zoltan Varga [Fri, 24 Jul 2015 21:59:42 +0000 (17:59 -0400)]
Merge pull request #1940 from lewurm/master
[mono-config] update path to libMonoPosixHelper in runtime/ as well
Bernhard Urban [Fri, 24 Jul 2015 21:24:14 +0000 (14:24 -0700)]
[mono-config] update path to libMonoPosixHelper in runtime/ as well
Zoltan Varga [Fri, 24 Jul 2015 19:28:11 +0000 (15:28 -0400)]
Merge pull request #1939 from madewokherd/monoconddestroy
Define mono_cond_destroy on non-Windows.
Vincent Povirk [Fri, 24 Jul 2015 19:03:29 +0000 (14:03 -0500)]
Define mono_cond_destroy on non-Windows.
This commit is licensed as MIT/X11.
João Matos [Fri, 24 Jul 2015 18:56:05 +0000 (19:56 +0100)]
[runtime] Rewrite MonoContext code to work via libunwind.
The latest Xcode 7 beta 4 SDK disallows usage of getcontext and friends.
João Matos [Fri, 24 Jul 2015 18:55:29 +0000 (19:55 +0100)]
[runtime] Compile fixes for WatchOS.
João Matos [Fri, 24 Jul 2015 18:54:33 +0000 (19:54 +0100)]
[sgen] Adapt Mach OS support code to work with cooperative GC.