mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8214773: Replace use of thread unsafe strtok
Reviewed-by: thartmann, dholmes
This commit is contained in:
parent
a1c8528d3f
commit
4246096355
5 changed files with 17 additions and 9 deletions
|
@ -473,15 +473,16 @@ bool vmIntrinsics::is_intrinsic_disabled(vmIntrinsics::ID id) {
|
|||
// Note, DirectiveSet may not be created at this point yet since this code
|
||||
// is called from initial stub geenration code.
|
||||
char* local_list = (char*)DirectiveSet::canonicalize_disableintrinsic(DisableIntrinsic);
|
||||
|
||||
char* save_ptr;
|
||||
bool found = false;
|
||||
char* token = strtok(local_list, ",");
|
||||
|
||||
char* token = strtok_r(local_list, ",", &save_ptr);
|
||||
while (token != NULL) {
|
||||
if (strcmp(token, vmIntrinsics::name_at(id)) == 0) {
|
||||
found = true;
|
||||
break;
|
||||
} else {
|
||||
token = strtok(NULL, ",");
|
||||
token = strtok_r(NULL, ",", &save_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue