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

Intel compiler reports internal error: access violation with /EHsc

Alexandr_K_Intel1
1,179 Views

EHsc is important, there is no crash without it. 

icl /Qm64 /EHsc hevcehw_base_packer.cpp
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.2.254 Build 20200623
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.

hevcehw_base_packer.cpp
hevcehw_base_packer.cpp(17): internal error: access violation
std::unique_ptr<PackedHeaders> ph = std::make_unique<PackedHeaders>(PackedHeaders{});
^

#include <memory>
#include <map>

struct PackedData
{
    std::map<unsigned, unsigned> PackInfo;
};

struct PackedHeaders
{
    PackedData Foo[2];
    PackedData Bar;
};

int main()
{
    std::unique_ptr<PackedHeaders> ph = std::make_unique<PackedHeaders>(PackedHeaders{});

    return 0;
}

 
Microsoft Visual Studio Professional 2017 (15.9.27) is used.

0 Kudos
5 Replies
PrasanthD_intel
Moderator
1,151 Views

Hi Alexandr,


Thanks for reporting this to us.

We have observed similar behaviour too.

We will be escalating this to our internal team.

As a temporary workaround, we found that when you re-arrange the struct variables inside PackedHeaders we haven't gotten any error.

Like this:

struct PackedHeaders

  PackedData Bar;

  PackedData Foo[2];

};


Regards

Prasanth


0 Kudos
PrasanthD_intel
Moderator
945 Views

Hi Alexander,


Thanks for your patience. The issue raised by you has been fixed in the latest OneAPI version 2021.2. Please download and let us know your experience with it.


0 Kudos
PrasanthD_intel
Moderator
926 Views

Hi Alexandr,


We haven't heard back from you. Please let us know your feedback after testing the latest version.


Regards

Prasanth


0 Kudos
Alexandr_K_Intel1
921 Views

Prasanth,

 

Sorry for the delay. Works fine with 

Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_000000

0 Kudos
PrasanthD_intel
Moderator
919 Views

Thanks for the confirmation, Alexander.

As your issue has been resolved, we are closing this thread. We will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only


Regards

Prasanth


0 Kudos
Reply