Set coredump_filter to include shared library code.
authorAditya Mandaleeka <adityam@microsoft.com>
Mon, 20 Jun 2016 21:29:37 +0000 (14:29 -0700)
committerAditya Mandaleeka <adityam@microsoft.com>
Mon, 20 Jun 2016 21:29:37 +0000 (14:29 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/e42ea2920222716e9751f78fa72b3256f85d8d4e

src/coreclr/tests/runtest.sh

index 333945b..3d69bbd 100755 (executable)
@@ -542,6 +542,14 @@ function set_up_core_dump_generation {
         # On Linux, we'll enable core file generation unconditionally, and if a dump
         # is generated, we will print some useful information from it and delete the
         # dump immediately.
+
+        if [ -e /proc/self/coredump_filter ]; then
+            # Include memory in private and shared file-backed mappings in the dump.
+            # This ensures that we can see disassembly from our shared libraries when
+            # inspecting the contents of the dump. See 'man core' for details.
+            echo 0x3F > /proc/self/coredump_filter
+        fi
+
         ulimit -c unlimited
     fi
 }