Bug with virtualization of BT instruction

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.

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).
vmptest2.zip (708 Bytes)

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.

Please send us a compiled binary instead of its sources.

Here you are.
vmptest2_binaries.zip (457 KB)

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.


vmptest2 binaries and map.zip (467 KB)

Please try the 1148 build.

It seems to work now. Thank you.