Bug with virtualization of BT instruction

Issues related to VMProtect
Post Reply
VilleK
Posts: 19
Joined: Thu Jan 10, 2019 9:34 am

Bug with virtualization of BT instruction

Post 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).
Attachments
vmptest2.zip
(708 Bytes) Downloaded 423 times
x22x22
Posts: 19
Joined: Sat Jul 20, 2019 2:33 pm

Re: Bug with virtualization of BT instruction

Post 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.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Bug with virtualization of BT instruction

Post by Admin »

Please send us a compiled binary instead of its sources.
VilleK
Posts: 19
Joined: Thu Jan 10, 2019 9:34 am

Re: Bug with virtualization of BT instruction

Post by VilleK »

Admin wrote:Please send us a compiled binary instead of its sources.
Here you are.
Attachments
vmptest2_binaries.zip
(457.41 KiB) Downloaded 417 times
VilleK
Posts: 19
Joined: Thu Jan 10, 2019 9:34 am

Re: Bug with virtualization of BT instruction

Post 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 5888 times
Attachments
vmptest2 binaries and map.zip
(467.05 KiB) Downloaded 381 times
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Bug with virtualization of BT instruction

Post by Admin »

Please try the 1148 build.
VilleK
Posts: 19
Joined: Thu Jan 10, 2019 9:34 am

Re: Bug with virtualization of BT instruction

Post by VilleK »

It seems to work now. Thank you.
Post Reply