Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4140509

(1.1) bad code semantics in method Locked_InitializeClass within JDK 1.1.6

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_2.5.1

      Description

      I ran across this code in method Locked_InitializeClass within file
      share/java/runtime/classresolver.c of JDK 1.1.6.
      (approx. lines 650-657)

          if (noLoader) {
      char *name = cbName(cb);
      if (strcmp(name, CLS_RESLV_INIT_REF) == 0) {
      CCSet(cb, SoftRef);
      }
      if (strncmp(name, "java/", 5) || strncmp(name, "sun/", 4)) {
      CCSet(cb, SysLock);
      }
          }

      IsSysLock will always be set if noLoader is non-zero since it is impossible
      for both calls to strncmp to return 0.

      I haven't seen where SysLock is used, so this may not matter.

        Attachments

          Activity

            People

            Assignee:
            sliangsunw Sheng Liang (Inactive)
            Reporter:
            jbenoit Jonathan Benoit (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: