Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29286 Discussions

CVF dll Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Nick2
New Contributor I
739 Views
Hello,

One of my latest builds with CVF 6.6 has a strange problem when I compile it as a DLL (versus stand-alone executable). Namely, when I try to call the DLL from my managed code, I get this:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

To make this more fun, here's what I tried...I tried running the manged front end with a different DLL, and it works fine. I tried to compile my Fortran with IVF instead of CVF, and then it works fine too.

Any ideas why or how to troubleshoot this?

Nick
0 Kudos
1 Reply
Nick2
New Contributor I
739 Views
Apparently my project settings were messed up...

Good flags:

# ADD F90 /automatic /browser /check:bounds /check:overflow /compile_only /fpe:0 /include:"Release/" /dll /libs:static /nologo /recursive /reentrancy:none /traceback /warn:argument_checking /warn:nofileopt
# SUBTRACT F90 /threads /winapp /fast

Bad flags:

# ADD F90 /automatic /browser /check:bounds /check:overflow /compile_only /fpe:0 /include:"Release/" /dll /libs:static /nologo /recursive /reentrancy:threaded /threads /traceback /warn:argument_checking /winapp
# SUBTRACT F90 /warn:nofileopt /fast
0 Kudos
Reply