DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.68k stars 562 forks source link

regression: cross-arch drconfig from 32-bit to 64-bit on Windows fails with file configs #900

Open derekbruening opened 9 years ago

derekbruening commented 9 years ago

From rnk@google.com on September 19, 2012 05:31:34

This came up while porting drconfig to Linux in issue #840 . From the comments https://codereview.appspot.com/6496077/diff/14/tools/drdeploy.c#newcode935 :

""" When I do "drconfig.exe -64" for some app, I still get a .config32 file in ~/dynamorio.

If I understand it correctly, the definition is in utils.c, which is linked into drconfiglib and policy_static, both of which are linked against by drconfig.exe. drconfiglib is a dll and policy_static is, well, static. So this call goes to policy_static and sets a global variable there. Then drconfiglib calls get_dr_platform, which resolves internally, and reads it's own global variable, which gets the default for however drconfig is built. """

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=900

derekbruening commented 9 years ago

From bruen...@google.com on September 19, 2012 06:02:27

to clarify and provide context: cross-arch used to work with registry config, so this is a regression.

however, this is not telling the whole story: I assume the first comment meant to say it's using a 32-bit drconfig.exe. when using a 64-bit drconfig.exe, -32 does produce a .config32, while the default produces a .config64, so cross-arch is working in some situations. furthermore, a 64-bit drconfig.exe when passed -64 seems to fail with an error even though the default works.

Summary: regression: cross-arch drconfig from 32-bit to 64-bit on Windows fails with file configs