8216559: [JFR] Native libraries not correctly parsed from /proc/self/maps
authorsgehwolf
Fri, 11 Jan 2019 13:34:57 +0100
changeset 53260 fbc921683f02
parent 53259 754312b616de
child 53261 b7dca420fa0c
8216559: [JFR] Native libraries not correctly parsed from /proc/self/maps Summary: Use %7s for the dev scan format as major:minor may be up to that length Reviewed-by: mgronlun, jwilhelm
src/hotspot/os/linux/os_linux.cpp
test/jdk/jdk/jfr/event/runtime/TestNativeLibrariesEvent.java
--- a/src/hotspot/os/linux/os_linux.cpp	Fri Jan 11 09:57:15 2019 -0800
+++ b/src/hotspot/os/linux/os_linux.cpp	Fri Jan 11 13:34:57 2019 +0100
@@ -1884,7 +1884,7 @@
       char name[PATH_MAX + 1];
 
       // Parse fields from line
-      sscanf(line, UINT64_FORMAT_X "-" UINT64_FORMAT_X " %4s " UINT64_FORMAT_X " %5s " INT64_FORMAT " %s",
+      sscanf(line, UINT64_FORMAT_X "-" UINT64_FORMAT_X " %4s " UINT64_FORMAT_X " %7s " INT64_FORMAT " %s",
              &base, &top, permissions, &offset, device, &inode, name);
 
       // Filter by device id '00:00' so that we only get file system mapped files.
--- a/test/jdk/jdk/jfr/event/runtime/TestNativeLibrariesEvent.java	Fri Jan 11 09:57:15 2019 -0800
+++ b/test/jdk/jdk/jfr/event/runtime/TestNativeLibrariesEvent.java	Fri Jan 11 13:34:57 2019 +0100
@@ -39,6 +39,7 @@
 
 /**
  * @test
+ * @bug 8216559
  * @key jfr
  * @requires vm.hasJFR
  * @library /test/lib