Looks like there is a bug in ObjectInvoke when calling method returning interface.

Looks like there is a bug in ObjectInvoke when calling method returning interface.
Result is cleared by
        VarClear(Result);
and later passed as interface pointer:
          ResultPointer :=@TVarData(Result).VInteger;
but VarClear do not set VInterer to zero, so interface RefCounter contains garbage, and when called method set Result to some value it first calls to _Release which leads to AV.

Comments

  1. AFAIK both @VUnknown and @Vinteger do point to the very same memory address! This is a variant record.

    ReplyDelete
  2. Alexander Sviridenkov Can you file a QP with a code sample, please?

    ReplyDelete
  3. David Millington
    Unfortunately I don't have isolated example. I'll create a QP if I will be able to reproduce it in a simple app.

    ReplyDelete

Post a Comment