2009-11-22 Miguel de Icaza <miguel@novell.com>
[mono.git] / mono / metadata / ChangeLog
index 97bbb26696b67a5922b70583c6ff5a34d503f7ff..55d1b619c8708b954c3d935e6d59d55e9c963589 100644 (file)
@@ -1,3 +1,547 @@
+2009-11-22  Miguel de Icaza  <miguel@novell.com>
+
+       * file-io.c: Surface a smart FindFirst/FindNext/FindClose API to
+       the managed world.
+
+       * icall-def.h: New entry points.
+       
+2009-11-19  Mark Probst  <mark.probst@gmail.com>
+
+       * process.c: Don't put references to managed objects into a
+       g_ptr_array.
+
+2009-11-18  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * class.c (can_access_internals): Allow CoreCLR to participate in
+       allowing (or not) [InternalsVisibleTo] between assemblies.
+       * security-core-clr.c|h: Make sure that only trusted code (a 
+       superset of platform code) can access the internals of platform
+       code.
+
+Mon Nov 16 16:28:11 CET 2009 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: use the correct base class to get the virtual method
+       "get_UnderlyingSystemType" and speed up the icall. Fixes bug #555013.
+
+2009-11-16  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * security-core-clr.c (get_caller_no_reflection_related): 
+       [Mono]Type.InvokeMember is outside System.Reflection[.Emit] but
+       it's still reflection and must be filtered correctly.
+
+2009-11-16  Mark Probst  <mark.probst@gmail.com>
+
+       * object.c (compute_class_bitmap): Fix for large bitmaps.
+
+2009-11-15  Zoltan Varga  <vargaz@gmail.com>
+
+       (mono_gc_get_suspend_signal): Fix the build with a system libgc.
+
+       * boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
+       koush@koushikdutta.com). Disable GC_no_dls on android.
+
+2009-11-12  Mark Probst  <mark.probst@gmail.com>
+
+       * sgen-gc.c (find_tlab_next_from_address): Handle the case where
+       tlab_next points outside the TLAB because the allocator was
+       interrupted.
+
+2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * reflection.c (mono_image_module_basic_init): Handle exceptions correctly.
+
+2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * object-internals.h: Change signature for mono_string_to_utf8_image.
+
+       * object.c (mono_string_to_utf8_image): Change signature to take a MonoError
+       argument.
+
+       * reflection.c: Take care of mono_string_to_utf8_image change and avoid raising
+       exceptions due to mono_string_to_utf8.
+
+2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * object-internals.h: Change signature for mono_string_to_utf8_mp.
+
+       * object.c (mono_remote_class): Make sure all resources are released before
+       raising an exception.
+
+       * object.c (mono_print_unhandled_exception): Avoid raising an exception.
+
+2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mono-perfcounters.c (network_get_impl): Change variable initialization
+       ordering to fix potential memory leak in case of exceptions.
+
+       * mono-perfcounters.c (mono_perfcounter_create): Properly handle badly
+       encoded strings.
+       
+2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): Change
+       variable initialization ordering to fix potential memory leak in case
+       of exceptions.
+
+2009-11-09  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (mono_ArgIterator_Setup): Remove the MONO_ARCH_REGPARMS stuff, its not
+       needed.
+
+2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * appdomain.c: Fix shadow path code to better deal with exceptions.
+
+2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * appdomain.c: Use checked version of mono_string_to_utf8 to avoid raising an
+       exception in the middle of the runtime code.
+
+2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): Don't
+       leak memory with broken envvar value.
+
+2009-11-06  Mark Probst  <mark.probst@gmail.com>
+
+       * reflection.c (mono_reflection_setup_internal_class): Because
+       nested classes are not added to the name cache, we must put them
+       in the reflection_info_unregister_classes list.
+
+2009-11-05  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * class.c: When CoreCLR is enabled don't call mono_init_com_types
+       if MONO_CLASS_IS_IMPORT return true unless the type reside in 
+       platform (trusted) code. Instead we return a TypeLoadException to
+       be thrown later. This is the exception thrown by Silverlight 2 if
+       a type, inside application (user) code is marked with [ComImport]
+
+2009-11-05  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
+       mono_is_debugger_attached () too.
+
+       * mono-debug.c (mono_is_debugger_attached): New helper function.
+       (mono_set_is_debugger_attached): Ditto.
+
+2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * object-internals.h: Add mono_string_to_utf8_checked.
+
+       * object.c: Implement mono_string_to_utf8_checked.
+
+2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c: Add missing check for load errors after every
+       call to mono_class_setup_fields
+
+       Fixes #552282.
+
+2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       metadata-verify.c (verify_tables_schema): Fix the error message.
+
+2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * metadata.c: Change event table schema to use TDOR for event type
+       as this is what it's meant to be.
+
+       * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
+       to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
+       entry.
+
+       * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
+       longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
+       rows in MONO_TABLE_GENERICPARAM.
+
+       Fixes #552289.
+
+2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_image_add_to_name_cache): Assert on duplicate
+       insertion.
+
+       * reflection.c (mono_reflection_setup_internal_class): Avoid
+       registering a gc root the same MonoClass multiple times.
+       Don't register nested types on the global scope as they should
+       not be available there.
+
+2009-11-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>
+
+       * culture-info-tables.h: regenerated.
+
+2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
+
+2009-11-04  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * string-icalls.c|h: Remove string internal calls that are not 
+       used anymore by the class libraries.
+       * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
+       which is not used in the class librairies.
+       * icall-def.h: Update tables.
+
+2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.h: Move mono_class_inflate_generic_type_checked...
+
+       * class-internals.h: to here and make it internal. We don't want to
+       further expose MonoGenericContext. 
+
+2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (mono_method_verify): Improve error message.
+
+2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * reflection.c (fieldref_encode_signature): If field_image is NULL then
+       the token is already properly encoded. Fixs 4.0 build.
+
+2009-11-04  Rolf Bjarne Kvinge  <RKvinge@novell.com>
+
+       * locales.c (construct_number_format): Check if the number index is
+       valid before trying to use it, if not, just return.
+       
+2009-11-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
+       since that loses the abort state. Fixes #539394.
+
+2009-11-03  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
+       explicit this argument to the call signature.
+       (mono_marshal_get_icall_wrapper): Ditto.
+
+2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * reflection.c (fieldref_encode_signature): Add new field_image parameter
+       to indicate which assembly to use when resolving a custom-mod.
+
+       Fixes handling of volatile fields used across assemblies as reported in #551513.
+
+2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * loader.c: Improve error messages.
+
+2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_setup_methods): Only give a slot for virtual methods
+       of interfaces. Fixes IKVM.
+
+       * class.c (mono_class_setup_vtable_general): Improve debug spew.
+
+2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (verifier_inflate_type): Return the inflated type on success.
+
+2009-11-02  Zoltan Varga  <vargaz@gmail.com>
+
+       * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
+
+       * threads.c (mono_thread_attach): Call the profiler thread start callback.
+
+       * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
+
+       * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
+       flag set.
+
+       * profiler.c: Add new profiler callbacks for runtime invoke.
+
+       * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
+
+2009-11-01  Mark Probst  <mark.probst@gmail.com>
+
+       * sgen-gc.c: Keep track of the reason for a major collection and
+       write it to the heap-dump file.
+
+2009-10-31  Miguel de Icaza  <miguel@novell.com>
+
+       * threads.c: refactor the code that initializes the
+       thread_start_args into a reusable function and use this in the two
+       methods that start up threads.
+
+2009-10-31  Zoltan Varga  <vargaz@gmail.com>
+
+       * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
+       Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
+
+2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * mono-perfcounters.c: add the "_Total" instance for CPU counters.
+       Until now, we only had the per-cpu(core) counters.
+
+2009-10-28  Mark Probst  <mark.probst@gmail.com>
+
+       * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
+       mono_gc_get_suspend_signal(), which returns the suspend signal
+       number used by the GC.
+
+2009-10-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
+
+       * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
+       signalling start_notify.
+
+2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * appdomain.c: do not test the st_mode field for shadow-copies.
+       Fixes bug #545276.
+
+2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * threadpool.[ch]: added hooks for thread start/finish and item
+       processing begin/end. For monotouch use only.
+
+2009-10-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * threads.c (mono_thread_get_name): New helper function.
+
+       * reflection.c (resolve_object): Set handle_class for strings too.
+       (mono_reflection_create_custom_attr_data_args): New helper function to decode
+       a cattr blob into a set of arrays and structures without creating the custom
+       attributes themselves.
+       (create_custom_attr_data): Simplify using create_custom_attr_data_args.
+
+       * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
+
+       * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
+       function.
+
+2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: Replace calls to mono_class_inflate_generic_type with
+       mono_class_inflate_generic_type_checked. Fixes #480005.
+
+2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
+       object since not all paths lead to callees initing it.
+
+2009-10-23  Alp Toker  <alp@nuanti.com>
+
+       Fix embedding API breakage from r144688. mono-compiler.h is an internal
+       header and should not be shipped:
+
+       * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
+       which is specific to the mono build. Not going to work.
+
+2009-10-23  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * security-manager.c: Report if core-clr is active from
+       ves_icall_System_Security_SecurityManager_get_SecurityEnabled
+       to allow Moonlight BCL to behave appropriately (both in browser
+       and outside, e.g. smcs)
+
+2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * mono-config.c: ignore UTF-8 BOM and report parser errors.
+       Fixes bug #549108.
+
+2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * class.c: fix typo.
+
+2009-10-22  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
+       a MonoError parameter.
+
+       * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
+       version that can does proper error handling.
+
+       * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
+
+       * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
+
+       * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
+
+2009-10-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
+       NO_UNALIGNED_ACCESS is defined.
+
+2009-10-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_string_builder_to_utf16): Applied patch from
+       Hib Eris  <hib@hiberis.nl>. Return empty string for empty string builders.
+       Fixes #549173.
+
+2009-10-22  Mark Probst  <mark.probst@gmail.com>
+
+       * sgen-gc.c: Shorten sections whenever possible.
+
+2009-10-22  Mark Probst  <mark.probst@gmail.com>
+
+       * sgen-gc.c: Use our portable semaphore #defines.
+
+2009-10-22  Mark Probst  <mark.probst@gmail.com>
+
+       * sgen-gc.c: A debug option for dumping the heap layout to a file
+       after each collection.
+
+2009-10-21  Mark Probst  <mark.probst@gmail.com>
+
+       * sgen-gc.c: Make managed write barriers atomic via
+       thread-restarts.
+
+2009-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
+       methods. Fixes #543021.
+
+2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * socket-io.[ch]: fix VS build.
+
+2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * icall-def.h:
+       * socket-io.[ch]: implemented SendFile.
+
+2009-10-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_create_from_typedef): Initialize class->element_class
+       before the interfaces to avoid crashes later if class initialization fails.
+       Fixes #548417.
+
+       * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
+       Fixes #548276.
+
+2009-10-20  Marek Safar  <marek.safar@gmail.com>
+
+       * domain.c: Bump 4.0 version.
+
+2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
+       code is known. (parse_public_key) Remove duplicate (unneeded) NULL
+       check since 'pubkey' can't be NULL at this stage
+       * icall.c (ves_icall_System_Array_FastCopy): Add comment about
+       the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
+       initialization of 'iter'
+
+2009-10-16  Bill Holmes  <billholmes54@gmail.com>
+
+       * cominterop.c : Search the interface parts of vtable to find 
+         method matches.  Fixes 547030.
+
+       Code is contributed under MIT/X11 license.
+
+2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * marshal.c: BeginInvoke cannot be called on multicast delegates with
+       multiple targets. Fixes bug #574426.
+
+2009-10-14  Massimiliano Mantione  <massi@ximian.com>
+
+       * profiler.h: Put here the definition of
+       MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
+       (and fix the build...).
+
+2009-10-14  Massimiliano Mantione  <massi@ximian.com>
+
+       * profiler.c, profiler.h, profiler-private.h:
+       Added support for different ways of getting call chains in stat mode.
+
+2009-10-12  Mark Probst  <mark.probst@gmail.com>
+
+       * object.c, object-internals.h: New function for computing the
+       size of an array, factored out of mono_array_new_full().  Use
+       SGen's functions for allocating arrays and vectors.
+
+       * sgen-gc.c, gc-internal.h: Special functions for allocating
+       arrays and vectors without race conditions.  A managed array
+       allocator method.
+
+       * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
+
+2009-10-12  Mark Probst  <mark.probst@gmail.com>
+
+       * object.c, object.h, icall.c: Write barriers do the copying now,
+       as well, so no need for an additional memcpy.
+
+       * sgen-gc.c: Lock when storing remsets.  Do the memory
+       copying/moving in the write barriers.
+
+       * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
+
+       * reflection.c: Added an assert.
+
+2009-10-12  Mark Probst  <mark.probst@gmail.com>
+
+       * threads.c, process.c: A few missing write barriers.
+
+2009-10-12  Joel W. Reed <joelwreed@gmail.com>
+
+       * mono-perfcounters.c, mono-perfcounters-def.h: Add
+       network performance counters for bytes sent per second, bytes
+       received per second, and bytes total per second.
+
+       Code is contributed under MIT/X11 license.
+
+2009-10-09  Mark Probst  <mark.probst@gmail.com>
+
+       * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
+       Fix warning.
+
+2009-10-09  Mark Probst  <mark.probst@gmail.com>
+
+       * threads.c, object-internals.h, object.c: Move code for
+       transferring an object to a different domain (via
+       serialization/remoting) to object.c.
+
+       * object.c (call_unhandled_exception_delegate): If the exception
+       is in a different domain than the delegate, transfer the exception
+       to that domain.
+
+2009-10-07  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
+       Fixes #322934.
+
+2009-10-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
+
+2009-10-06  Mark Probst  <mark.probst@gmail.com>
+
+       * object.c (mono_method_return_message_restore): Handle the case
+       where the argument is an instance of a generic type.  Fixes
+       #544446.
+
+2009-10-06  Mark Probst  <mark.probst@gmail.com>
+
+       * object.c (set_value): Write barrier fix - we must pass the
+       count, not the size.
+
+2009-10-05  Zoltan Varga  <vargaz@gmail.com>
+
+       * domain.c (mono_init_internal): Print a useful error message when encountering
+       an old mscorlib, instead of crashing. Fixes #544307.
+
+2009-10-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * appdomain.c (copy_app_domain_setup): Fix a warning.
+
+       * debug-helpers.c (dis_one): Ditto.
+
+2009-10-04  Mark Probst  <mark.probst@gmail.com>
+
+       * domain-internals.h, appdomain.c: The AppDomainSetup is copied
+       into the new domain, instead of referencing the original one.
+
+       * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
+       non-static.
+
+       * appdomain.c: Corlib version bump.
+
+2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * threadpool.c: one more...
+
 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * threadpool.c: forgot a LeaveCriticalSection when telling the idle
        * sgen-gc.c: Try to shorten the new section after a major
        allocation to avoid ever-growing sections.
 
+2009-10-13  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
+       `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
+       `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
+       `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
+
+       * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
+
 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * threadpool.c: fixed the order in which 'completed' and the wait