Skip to content

Commit 7b2a675

Browse files
committed
8341820: Check return value of hcreate_r
Backport-of: 7c0dbf8e9c69d51aa8e06305e4483002116019f4
1 parent 21b76f3 commit 7b2a675

File tree

1 file changed

+3
-3
lines changed
  • src/jdk.hotspot.agent/linux/native/libsaproc

1 file changed

+3
-3
lines changed

src/jdk.hotspot.agent/linux/native/libsaproc/symtab.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ static struct symtab* build_symtab_internal(int fd, const char *filename, bool t
389389
goto bad;
390390
}
391391

392-
// int rslt =
393-
hcreate_r(htab_sz, symtab->hash_table);
394-
// guarantee(rslt, "unexpected failure: hcreate_r");
392+
if (hcreate_r(htab_sz, symtab->hash_table) == 0) {
393+
goto bad;
394+
}
395395

396396
// shdr->sh_link points to the section that contains the actual strings
397397
// for symbol names. the st_name field in ELF_SYM is just the

0 commit comments

Comments
 (0)