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

regsvr32 fails if some included obj compiled with icl

rich-kulakowski
Beginner
341 Views

Greetings,

I am trying to register a dll using regsvr32. Only some of our functions are compiled with icl, most are done with msvcc. We are attempting to convert to 10.1.025 from 9.1.037. This all worked with 9.1. When I compile everything with msvcc, it works fine, no problems registering or anything. When I compile with 9.1 it all works. With 10.1.025 it crashes out during registering with an access violation, address = 0x00000000. It never seems to get into our dll, none of the breakpoints are hit. Using WinDbg, the crash stack looks like:

0007e0fc 0097dd21 libguide40!kmp_set_defaults+0x1033
0007e11c 0097cda4 libguide40!_kmp_fork_call+0x56bd
0007e124 00972a75 libguide40!_kmp_fork_call+0x4740
0007e138 00971c39 libguide40!kmp_set_defaults+0xf79
0007e144 009ab1d4 libguide40!kmp_set_defaults+0x13d
0007e180 7c9011a7 libguide40!_kmpc_dispatch_init_8u+0x3484
0007e1a0 7c91cbab ntdll!LdrpCallInitRoutine+0x14
0007e2a8 7c916178 ntdll!LdrpRunInitializeRoutines+0x344
0007e554 7c9162da ntdll!LdrpLoadDll+0x3e5
0007e7fc 7c801bb9 ntdll!LdrLoadDll+0x230
0007e864 01001dbe kernel32!LoadLibraryExW+0x18e
0007ff1c 010024bf regsvr32!wWinMain+0x741
0007ffc0 7c816fd7 regsvr32!wWinMainCRTStartup+0x198
0007fff0 00000000 kernel32!BaseProcessStart+0x23

Why is it crashing in libguide? I have set OMP_NUM_THREADS=1. Is that accessed even through regsvr32? I had a similar problem when just starting the application using the 5.3 version of IPP and found that I needed to set ippSetNumThreads(1). Can't figure out where to put that in this stream. Is there a compiler option to disable the OpenMP stuff that I am missing?

Thanks.

Rich.

0 Kudos
3 Replies
diehard2
Beginner
341 Views
Quoting - rich-kulakowski

Greetings,

I am trying to register a dll using regsvr32. Only some of our functions are compiled with icl, most are done with msvcc. We are attempting to convert to 10.1.025 from 9.1.037. This all worked with 9.1. When I compile everything with msvcc, it works fine, no problems registering or anything. When I compile with 9.1 it all works. With 10.1.025 it crashes out during registering with an access violation, address = 0x00000000. It never seems to get into our dll, none of the breakpoints are hit. Using WinDbg, the crash stack looks like:

0007e0fc 0097dd21 libguide40!kmp_set_defaults+0x1033
0007e11c 0097cda4 libguide40!_kmp_fork_call+0x56bd
0007e124 00972a75 libguide40!_kmp_fork_call+0x4740
0007e138 00971c39 libguide40!kmp_set_defaults+0xf79
0007e144 009ab1d4 libguide40!kmp_set_defaults+0x13d
0007e180 7c9011a7 libguide40!_kmpc_dispatch_init_8u+0x3484
0007e1a0 7c91cbab ntdll!LdrpCallInitRoutine+0x14
0007e2a8 7c916178 ntdll!LdrpRunInitializeRoutines+0x344
0007e554 7c9162da ntdll!LdrpLoadDll+0x3e5
0007e7fc 7c801bb9 ntdll!LdrLoadDll+0x230
0007e864 01001dbe kernel32!LoadLibraryExW+0x18e
0007ff1c 010024bf regsvr32!wWinMain+0x741
0007ffc0 7c816fd7 regsvr32!wWinMainCRTStartup+0x198
0007fff0 00000000 kernel32!BaseProcessStart+0x23

Why is it crashing in libguide? I have set OMP_NUM_THREADS=1. Is that accessed even through regsvr32? I had a similar problem when just starting the application using the 5.3 version of IPP and found that I needed to set ippSetNumThreads(1). Can't figure out where to put that in this stream. Is there a compiler option to disable the OpenMP stuff that I am missing?

Thanks.

Rich.

Hi, make sure libguide40 is in the same directory as your dll. regsvr loads the dll, and this in turn loads libguide (which most likely is nowhere in your path). Hope this helps

0 Kudos
TimP
Honored Contributor III
341 Views
Quoting - diehard2

Hi, make sure libguide40 is in the same directory as your dll. regsvr loads the dll, and this in turn loads libguide (which most likely is nowhere in your path). Hope this helps

Check that the correct OpenMP support library is in use (not the older 9.1 library), and that you have consistently chosen the "legacy" libguide rather than using the current VC-compatible (lib-compat) libiomp5.

0 Kudos
rich-kulakowski
Beginner
341 Views
Quoting - diehard2

Hi, make sure libguide40 is in the same directory as your dll. regsvr loads the dll, and this in turn loads libguide (which most likely is nowhere in your path). Hope this helps

diehard2,

Thanks for the reply. The dll is in the correct directory, the top 5 calls in the stack are all within that library. I have opened a Premier case and we are working on it. There is some issue in the openmp libs somewhere.

Its amazing because we don't use the openmp stuff in our application anywhere, it just seems to get pulled in because the IPP libs use it. In some cases, they are not compiled with ICL, just link with IPP and the lib files from ICL 10.1. These are more recent than the ones in IPP and overwrite the IPP versions.

Thanks again.

Rich.

0 Kudos
Reply