unsafe pointer subtraction in klassVtable constructor

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • hs13
    • Affects Version/s: 1.2.2
    • Component/s: hotspot
    • None
    • gc
    • generic
    • generic

      The pointer subtraction in the klassVtable ctor to compute _tableOffset is unsafe in a 64-bit VM.

       public:
        klassVtable(KlassHandle h_klass, void* base, int length) : _klass(h_klass) {
          _tableOffset = (address)base - (address)h_klass(); _length = length;
        }

      Spotted by Peter Kessler.

            Assignee:
            John Coomes (Inactive)
            Reporter:
            John Coomes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: