NVlabs / NVBit

198 stars 18 forks source link

Segmentation fault at getOffset() #95

Closed mahmoodn closed 1 year ago

mahmoodn commented 1 year ago

For the following code on 1.5.5

      if (verbose) {
        instr->printDecoded();
        printf("opcode=%s -- %s -- %s\n", instr->getOpcode(), instr->getSass(), instr->getOpcodeShort());
        printf("offset = %s\n", instr->getOffset());
      }

I get the following error

Instr 1 @ 0x10 (16) - S2R R5, SR_TID.X ;
  has_guard_pred = 0
  opcode = S2R/S2R
  memop = NONE
  format = NO_FORMAT
  load/store = 0/0
  size = 4
--op[0].type = REG
  is_neg/is_not/abs = 0/0/0
  size = 4
  num = 5
  prop = 
--op[1].type = GENERIC
  is_neg/is_not/abs = 0/0/0
  size = 4
  value = SR_TID.X
opcode=S2R -- S2R R5, SR_TID.X ; -- S2R
Segmentation fault (core dumped)

It seems that getOffset()is not properly handled.

mahmoodn commented 1 year ago

Sorry there was a type at %s which should be %d.