Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7768 Discussions

Intel compiler reports internal error: access violation with /EHsc

Alexandr_K_Intel1
812 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
784 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


PrasanthD_intel
Moderator
578 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.


PrasanthD_intel
Moderator
559 Views

Hi Alexandr,


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


Regards

Prasanth


Alexandr_K_Intel1
554 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

PrasanthD_intel
Moderator
552 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


Reply