Temporarily disable embedded ppdb data decompression (mono/mono#16868)
authorRyan Lucia <rylucia@microsoft.com>
Tue, 17 Sep 2019 09:23:05 +0000 (05:23 -0400)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 17 Sep 2019 09:23:05 +0000 (11:23 +0200)
This addresses mono/mono#16373. We will work on a proper fix, but this at least unblocks Roslyn CI

Commit migrated from https://github.com/mono/mono/commit/6252794ebe6cd6f04131dbb1ea0da3a8cd4c6ab1

src/mono/mono/metadata/debug-mono-ppdb.c
src/mono/mono/metadata/metadata-internals.h

index 7569191..7d3dbda 100644 (file)
@@ -172,9 +172,10 @@ mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size)
                return NULL;
        }
 
+// Temporarily disabled to unblock Roslyn
+#if HOST_WIN32 //|| HAVE_SYS_ZLIB
        if (ppdb_data) {
                /* Embedded PPDB data */
-#if HAVE_SYS_ZLIB || HOST_WIN32
                /* ppdb_size is the uncompressed size */
                guint8 *data = g_malloc0 (ppdb_size);
                z_stream stream;
@@ -194,8 +195,8 @@ mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size)
                raw_contents = data;
                size = ppdb_size;
                to_free = data;
-#endif
        }
+#endif
 
        MonoAssemblyLoadContext *alc = mono_image_get_alc (image);
        if (raw_contents) {
index f4c9b47..059cf6d 100644 (file)
@@ -330,8 +330,11 @@ typedef struct {
        void *raw_data_handle;
        char *raw_data;
        guint32 raw_data_len;
+       /* data was allocated with mono_file_map and must be unmapped */
        guint8 raw_buffer_used    : 1;
+       /* data was allocated with malloc and must be freed */
        guint8 raw_data_allocated : 1;
+       /* data was allocated with mono_file_map_fileio */
        guint8 fileio_used : 1;
 
 #ifdef HOST_WIN32