Page 1 of 1

Bug with virtualization of BT instruction

Posted: Mon Sep 02, 2019 9:10 am
by VilleK
Hi,

I see this in the changelog for VMP 3.4:

"Fixed a bug that occurred during virtualization of BT [m16]"

But there still is a problem with latest release.

The following Delphi program will use the BT instruction to find a value in a set and it fails after being virtualized. Tested in VMP build 1131 and 1142.

Code: Select all

program vmptest2;

{$APPTYPE CONSOLE}

procedure f;
const
  TestValue = 32;
  MySet : set of byte = [TestValue];
var
  I : integer;
  B : boolean;
begin
  I := TestValue;
  B := I in MySet;   //<<this will use the BT instruction

  if B then
    writeln('pass')
  else
    writeln('fail');
end;

begin
  f;

  readln;
end.
Attaching source and vmp-config in zip.

Can you fix this please? We had to downgrade to older version for now (it works in build 1086).

Re: Bug with virtualization of BT instruction

Posted: Tue Sep 03, 2019 10:13 am
by x22x22
Also, there is a another bug on virtualization which is crash problems.

My protected application crashes every 30-40minutes later after the start and this problem is occurring only version 3.4.
And I had to use vmp 3.3.1 for now there aren't any problem on 3.3.1.

Re: Bug with virtualization of BT instruction

Posted: Tue Sep 03, 2019 2:30 pm
by Admin
Please send us a compiled binary instead of its sources.

Re: Bug with virtualization of BT instruction

Posted: Tue Sep 03, 2019 2:42 pm
by VilleK
Admin wrote:Please send us a compiled binary instead of its sources.
Here you are.

Re: Bug with virtualization of BT instruction

Posted: Thu Sep 05, 2019 1:47 pm
by VilleK
Here is a zip that also contain the map-file in case you need it.

This is where I suspect the problem is. It seems to work with bit offsets that are small (less than 16?) but in the example where it is 32 it will fail to virtualize correctly.
Skärmklipp.PNG
Skärmklipp.PNG (34.91 KiB) Viewed 7080 times

Re: Bug with virtualization of BT instruction

Posted: Tue Sep 10, 2019 6:51 am
by Admin
Please try the 1148 build.

Re: Bug with virtualization of BT instruction

Posted: Thu Sep 12, 2019 2:35 pm
by VilleK
It seems to work now. Thank you.