Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Intel Pin for Windows seems to crash for certain applications

PBearson
Beginner
957 Views

Hi,

 

I am trying to use Intel Pin to perform some instrumentation on Windows binaries. I am running Intel Pin version 3.25 on Windows 11 Build 22621. One of the apps I am trying to instrument is YABE (Yet Another BACnet Explorer, a PE32 executable), which can be found here: Yet Another Bacnet Explorer - Browse Files at SourceForge.net

 

When the user launches YABE, it opens a GUI that looks like the following screenshot:

 

PBearson_0-1667226848587.png

 

The problem is that when I try to instrument YABE with Pin, it crashes immediately after the user interacts with the GUI. Pin does not report any output. After the crash, when I run:

 

 

echo %ERRORLEVEL%

 

 

It returns -1. Even for minimal pintools like the one below, the crash still happens:

 

#include "pin.H"
#include <iostream>

int main(int argc, char* argv[])
{
    if (PIN_Init(argc, argv)) return -1;

    // Never returns
    PIN_StartProgram();

    return 0;
}

 

I don't think it's a memory or other resource issue because everything looks okay when I look at the Task Manager.

 

I actually haven't had this happen with other targets, so maybe the bug is with YABE. But YABE works perfectly okay when I don't instrument it. Does anyone have any idea why this might be happening?

0 Kudos
1 Solution
SeshaP_Intel
Moderator
744 Views

Hi,


Thanks for your response. But we suggest you raise this issue in Pinheads Newsgroup for better assistance. Please refer to the below link to raise the issue.

https://www.intel.com/content/www/us/en/developer/articles/tool/pin-a-dynamic-binary-instrumentation-tool.html


Thanks and Regards,

Pendyala Sesha Srinivas


View solution in original post

0 Kudos
7 Replies
PBearson
Beginner
894 Views

I discovered that the software runs okay if I launch the Pintool like this:

 

pin -t <pintool> -- cmd /C yabe

 

The crash happened when I ran it like this:

 

pin -t <pintool> -- yabe

But to me, it looks like the first case will instrument cmd.exe instead of yabe.exe. Does anyone know more about this?

 

0 Kudos
SeshaP_Intel
Moderator
850 Views

Hi,


Could you please provide the following details to investigate the issue more from our end?

1. Compiler version you are using.

2. Processor you are working on.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
PBearson
Beginner
830 Views

Sure thing.

  1. Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31630 for x86 (cl.exe provided by Visual Studio 2022)
  2. Processor: Intel Core i7-8700K

(I have tried this on both my work computer and my laptop. The above specs are for my work computer. I will update this post with my laptop specs when I have access to it.)

 

Edit: Laptop specs are below:

  1. Compiler: Identical to above
  2. Processor: Intel Core i9-11900H

 

By the way, I also found the following command causes an eventual crash with YABE:

 

 

pin -follow_execv -t obj-ia32\icount.dll -- cmd /C Yabe                                                                                                                                                     

 

 

 

This is the same icount as the one provided in the SimpleExamples directory. All I've done here is added the "-follow_execv" flag.

0 Kudos
SeshaP_Intel
Moderator
745 Views

Hi,


Thanks for your response. But we suggest you raise this issue in Pinheads Newsgroup for better assistance. Please refer to the below link to raise the issue.

https://www.intel.com/content/www/us/en/developer/articles/tool/pin-a-dynamic-binary-instrumentation-tool.html


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
SeshaP_Intel
Moderator
697 Views

Hi,


Hope the above information helped. I would go ahead and close this thread.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
PBearson
Beginner
677 Views

Thanks. I was able to solve the issue once I raised the issue in Pinheads. Unfortunately, I don't know how to close this thread.

0 Kudos
SeshaP_Intel
Moderator
638 Views

Hi,


Thanks for the confirmation. This thread will no longer be monitored by Intel.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Reply