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
--- 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