Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rong__amadeus
Beginner
82 Views

Why does my application crash on Win10 when I use inline assembly

Hello,

the company I work for bought the Intel compiler so we can build our software which uses inline assembly code also in 64bit. (Visual C++ only supports inline assembly in 32bit).

The machine I build on is a windows 7 workstation. Here the software runs just fine - either with the assembly code parts activated or with slower standard c++ code replacements. It also works on every other windows 7 machine I tested.

But on windows 10 the software only works with slower standard c++ code replacement. It crashes when I try the version with inline assembly code.

Does anyone have an idea why this happens?

 

Best Regards

Amadeus

0 Kudos
6 Replies
Oscar_Creus
Beginner
82 Views

Hi 

Without any clue of source code it's impossible to guess what's happening.

Sorry.

SergeyKostrov
Valued Contributor II
82 Views

Amadeus, please provide more technical details.
Yuan_C_Intel
Employee
82 Views

Amadeus,

Please also provide what kind of error message you see when it crashes on Windows 10.

Thanks.

rong__amadeus
Beginner
82 Views

Hello - thanks - here are more details.

To develop and build the software on my workstation I use:

-Windows 7

-Microsoft Visual Studio Professional 2013

-Intel Parallel Studio XE 2016 Update 2 Composer Edition for C++ Windows (Every setting on defaults)

On any Windows 7 machine I tested the software works. To test the compability with newer Windows versions I borrowed notebooks with Windows 8.1 and Windows 10. Here the software crashes. The windows 8.1 notebook doesn't have Visual Studio. When I get the error on the Windows 10 notebook and hit debug I get "An unhandled win32 exception occured in Softwarename.exe[8144]." On that notebook only Visual Studio Community 2015 is installed and no Intel Parallel Studio. So I can't let it run in Debug mode. In my company IT security does not allow windows versions newer than Windows 7. So I don't know how to debug properly. I was merely wondering if there are some known general issues when building 64bit inline assembly code with the Intel compiler for Windows 8.1 and Windows 10.

Per defines before buildilg I can choose wether the software should use the assembly code parts or not. The software does not crash when I define not to use assembly code. It crashes with the error above when I define to use the assembly code. So the basic structure of the .cpp with the inline assembly code looks like this:

#ifdef _NO_ASSEMBLY

    void functionName(){

        standard cpp code

    }

#else

    #ifndef _M_X64

        void functionName(){

            _asm{32bit inline assembly code}

        }

    #else

        void functionName(){

        _asm{64bit inline assembly code}

        }

    #endif

#endif

Oscar_Creus
Beginner
82 Views

Hi!

Have you generated the map file to try to see the offending function and offset?

rong__amadeus
Beginner
82 Views

Thanks for the hint Oscar,

I am going to try to use a map file to find the functin which causes the crash.

Reply