Address is already used by function error

Issues related to VMProtect
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Address is already used by function error

Post by skiselkov »

I'm building a Windows DLL on Linux and using VMProtect on Linux to protect the resulting DLL. But for some reason, some functions seemingly are generating address conflicts (see screenshot). The only way I can work around this is to turn off protection for the conflicting functions, which is not really something I'd want to do. Checking the load addresses, the functions clearly don't use the same addresses, so this must be something internal to VMProtect. Doesn't matter if I use Virtualization, or Virtualization + Mutation. This only happens when trying to protect the windows DLL. The Linux shared library version of the same code is working perfectly OK.
I saw another topic on the forum regarding this, but the thread contained no resolution information. How do I work around this issue?
Last edited by skiselkov on Mon Feb 19, 2018 1:14 pm, edited 1 time in total.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

Could you send us a test example (original DLL+VMP files) that shows your problem?
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

Certainly. Do you have an e-mail or FTP server I can upload this to? I saw build@vmpsoft.com being used by some others. Is that a valid target?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

Please send to info@vmpsoft.com
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

E-mail sent. Thank you for your help!
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

Please try the 938 build.
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

The new version works perfectly! Thank you very much, I'm very impressed at the speed of your support!
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

Thanks :))
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

I believe I've run into the same issue when trying to compile a Mac build of my library using VMProtect 3.1.2.938 on Linux. It's not detecting the end marker and reading past the VMProtectEnd marker, resulting in multiple protected code segments overlapping. I've sent the binary to info@vmpsoft.com. If you could please take a look at this, I'd very much appreciate any help.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

Try the 939 build.
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

Thank you. Now I can compile the file, but when I try to load the dylib into the application, I get this error:

Code: Select all

dlerror:dlopen(.../mac.xpl, 6): no suitable image found.  Did find:
	.../mac.xpl: malformed mach-o image: segment .vmp1 file content overlaps segment .vmp
	.../mac.xpl: malformed mach-o image: segment .vmp1 file content overlaps segment .vmp
I used the compilation defaults in VMProtect, just to make sure I didn't break something on my own.
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

Just FYI, I've been able to get the dylib to load into the application when by disabling output packing in the VMProtect options. Is that a known limitation for dynamic libraries on Mac?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

It just new useless checks in dyld:
https://opensource.apple.com/source/dyl ... .auto.html
skiselkov
Posts: 10
Joined: Sat Feb 17, 2018 11:10 pm

Re: Address is already used by function error

Post by skiselkov »

Thank you for clearing that up. Unfortunately I can't change the library loading routines (they're done by a 3rd application), so I had to disable output packing on Mac.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Address is already used by function error

Post by Admin »

Try the 947 build.
Post Reply