8216559: [JFR] Native libraries not correctly parsed from /proc/self/maps

Use %7s for the dev scan format as major:minor may be up to that length

Reviewed-by: mgronlun, jwilhelm
This commit is contained in:
Severin Gehwolf 2019-01-11 13:34:57 +01:00
parent 5ad47c58a3
commit e978a4094a
2 changed files with 2 additions and 1 deletions

View File

@ -1884,7 +1884,7 @@ int os::get_loaded_modules_info(os::LoadedModulesCallbackFunc callback, void *pa
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.

View File

@ -39,6 +39,7 @@ import jdk.test.lib.jfr.Events;
/**
* @test
* @bug 8216559
* @key jfr
* @requires vm.hasJFR
* @library /test/lib