src/hotspot/share/classfile/vmSymbols.cpp
changeset 52894 8df9cf767f79
parent 52220 9c260a6b6471
child 52979 7384e00d5860
--- a/src/hotspot/share/classfile/vmSymbols.cpp	Fri Dec 07 14:36:43 2018 +0530
+++ b/src/hotspot/share/classfile/vmSymbols.cpp	Tue Dec 04 18:55:06 2018 +0100
@@ -473,15 +473,16 @@
   // 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);
     }
   }