Python3 C++ Module - Exception - GIL not held - c++

I have created a minimal reproduction of an issue I am having, trying to create a C++ based Python3 module. The build environment is CMake, Visual Studio Pro 2019, WinSDK 10.0.18362, Python 3.9.4. When executing:
python3 -c "import pymod"
I will get an exception in release mode with a NULL access. In debug Python, I get additional information.
My CMakeLists.txt
cmake_minimum_required(VERSION 3.15)
project(pymod_minimal_repo_example)
find_package(Python3 COMPONENTS Interpreter Development)
add_library(pymod SHARED)
target_sources(pymod PRIVATE pymodmodule.cpp)
set_target_properties(pymod PROPERTIES SUFFIX ".pyd")
target_compile_options(pymod PRIVATE /Zi)
target_link_options(pymod PRIVATE /DEBUG:FULL)
target_link_libraries(pymod PRIVATE ${Python3_LIBRARIES})
target_include_directories(pymod PRIVATE ${Python3_INCLUDE_DIRS})
Following this python reference: https://docs.python.org/3.9/extending/extending.html#a-simple-example I created the following:
#define PY_SSIZE_T_CLEAN
#include <Python.h>
static struct PyModuleDef pymodmodule = {
PyModuleDef_HEAD_INIT, // m_base
"pymod", // m_name
NULL, // m_doc
-1, // m_size - submod not support must be static struct
NULL, // m_methods - no functions present
NULL, // m_slots - must be NULL
NULL, // m_traverse - not needed
NULL, // m_clear - not needed
NULL // m_free - not needed
};
PyMODINIT_FUNC PyInit_pymod(void) {
return PyModule_Create(&pymodmodule);
}
It is a functionally void module which does nothing, but should still run. Note that having m_methods defined, produces the same failure.
When the failure occurs, the following is output to the console:
E:\projects\pymod\build\Debug>python -c "import pymod"
Fatal Python error: _PyInterpreterState_GET: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)
Python runtime state: unknown
WinDbg jit debugger then catches the issue. A partial call stack shows my PyInit_pymod is called and when creating the python module, it cascades to a failure:
0:000> k
# Child-SP RetAddr Call Site
00 000000dc`abfed4a8 00007fff`71d51385 KERNELBASE!wil::details::DebugBreak+0x2
01 000000dc`abfed4b0 00007fff`71d511a8 python39_d!fatal_error_exit+0x15 [D:\a\1\s\Python\pylifecycle.c # 2201]
02 000000dc`abfed4e0 00007fff`71d4ea98 python39_d!fatal_error+0x1b8 [D:\a\1\s\Python\pylifecycle.c # 2286]
03 000000dc`abfed540 00007fff`71cbe730 python39_d!_Py_FatalErrorFunc+0x38 [D:\a\1\s\Python\pylifecycle.c # 2302]
04 000000dc`abfed580 00007fff`71aa8044 python39_d!_Py_FatalError_TstateNULL+0x10 [D:\a\1\s\Python\ceval.c # 251]
05 000000dc`abfed5b0 00007fff`71aa6cf2 python39_d!_PyInterpreterState_GET+0x34 [D:\a\1\s\Include\internal\pycore_pystate.h # 105]
06 000000dc`abfed5f0 00007fff`d0be13e7 python39_d!PyModule_Create2+0x12 [D:\a\1\s\Objects\moduleobject.c # 168]
>>>> 07 000000dc`abfed620 00007fff`751165dc pymod!PyInit_pymod+0x27 [E:\projects\pymod\pymodmodule.cpp # 19]
08 000000dc`abfed660 00007fff`751167ee python39!_PyImport_LoadDynamicModuleWithSpec+0x104 [C:\A\34\s\Python\importdl.c # 165]
09 000000dc`abfed6d0 00007fff`75116749 python39!_imp_create_dynamic_impl+0x86 [C:\A\34\s\Python\import.c # 2299]
0a 000000dc`abfed700 00007fff`750cb94b python39!_imp_create_dynamic+0x39 [C:\A\34\s\Python\clinic\import.c.h # 330]
0b 000000dc`abfed730 00007fff`750ad500 python39!cfunction_vectorcall_FASTCALL+0x9b [C:\A\34\s\Objects\methodobject.c # 426]
0c 000000dc`abfed7a0 00007fff`750ad2ef python39!PyVectorcall_Call+0x5c [C:\A\34\s\Objects\call.c # 248]
0d 000000dc`abfed800 00007fff`750ad418 python39!_PyObject_Call+0x4f [C:\A\34\s\Objects\call.c # 287]
0e (Inline Function) --------`-------- python39!PyObject_Call+0xc [C:\A\34\s\Objects\call.c # 293]
0f 000000dc`abfed830 00007fff`7508c65f python39!do_call_core+0xb8 [C:\A\34\s\Python\ceval.c # 5092]
10 000000dc`abfed880 00007fff`75083963 python39!_PyEval_EvalFrameDefault+0x5d6f [C:\A\34\s\Python\ceval.c # 3581]
11 (Inline Function) --------`-------- python39!_PyEval_EvalFrame+0x13 [C:\A\34\s\Include\internal\pycore_ceval.h # 40]
12 000000dc`abfedbb0 00007fff`750855a7 python39!_PyEval_EvalCode+0x2b3 [C:\A\34\s\Python\ceval.c # 4327]
13 000000dc`abfedc80 00007fff`7508823d python39!_PyFunction_Vectorcall+0x257 [C:\A\34\s\Objects\call.c # 396]
14 000000dc`abfedd80 00007fff`7508812f python39!_PyEval_EvalFrameDefault+0x194d [C:\A\34\s\Python\ceval.c # 3487]
15 000000dc`abfee0b0 00007fff`750888e5 python39!_PyEval_EvalFrameDefault+0x183f [C:\A\34\s\Python\ceval.c # 3504]
16 000000dc`abfee3e0 00007fff`750888e5 python39!_PyEval_EvalFrameDefault+0x1ff5 [C:\A\34\s\Python\ceval.c # 3518]
17 000000dc`abfee710 00007fff`750888e5 python39!_PyEval_EvalFrameDefault+0x1ff5 [C:\A\34\s\Python\ceval.c # 3518]
18 000000dc`abfeea40 00007fff`750854c4 python39!_PyEval_EvalFrameDefault+0x1ff5 [C:\A\34\s\Python\ceval.c # 3518]
I cannot find any information on the console message, nor the int3. I have tried full purge and reinstall/update of Python.
Can anyone offer some direction to help, or know the cause?
Edit: Modified that PyModule_pymod function to display Pre and Post msg to console. Debug build exceptions, Release appears not to:
PyMODINIT_FUNC PyInit_pymod(void) {
printf("Pre-PyModule_Create\n");
PyObject *obj = PyModule_Create(&pymodmodule);
printf("Post-PyModule_Create\n");
return obj;
}
Release:
E:\projects\pymod\build\Release>python -c "import pymod"
Pre-PyModule_Create
Post-PyModule_Create
Debug:
E:\projects\pymod\build\Debug>python -c "import pymod"
Pre-PyModule_Create
Fatal Python error: _PyInterpreterState_GET: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)
Python runtime state: unknown

I ran into the same issue as you, and while debugging TLS structures, I noticed that Visual Studio had loaded python310.dll instead of python310_d.dll.
To make a long story short, when you define the _DEBUG macro, Python.h will use python310_d.lib, so you need to run the debug version of Python:
python_d -c "import pymod"
I was confused further by the fact that I did not have this issue while using pybind11. As it turned out, pybind11 undefines the _DEBUG macro while including Python.h, so it is always using python310.lib instead of python310_d.lib, even for debugging builds.
As I do not see an option to use the python_d interpreter in Visual Studio, I ended up using the release library for debugging builds using the following code:
#if defined(_MSC_VER) && defined(_DEBUG)
#undef _DEBUG
#include <Python.h>
#define _DEBUG 1
#else
#include <Python.h>
#endif
As a sidenote, when you link against python310_d.dll, you will have to name your debug module pymod_d.pyd instead of pymod.pyd.

Related

How to configure Coverity for IAR ARM (iccarm)

I configured Coverity with
The build is successful, but I receive Recoverable errors in the system headers (see build-log.txt)
For me it’s not clear why these errors occur (build is successful) and how to configure Coverity that these errors don’t occur at all?
2022-10-20T13:38:11.227719Z|cov-build|66594|info|> cov-build 2022.3.3 (build d37b3c67c6 p-2022.3-push-69)
2022-10-20T13:38:11.227742Z|cov-build|66594|info|> Coverity Build Capture (64-bit) version 2022.3.3 on Linux 5.15.0-48-generic x86_64
2022-10-20T13:38:11.227742Z|cov-build|66594|info|> Internal version numbers: d37b3c67c6 p-2022.3-push-69
2022-10-20T13:38:11.227742Z|cov-build|66594|info|>
2022-10-20T13:38:11.227757Z|cov-build|66594|info|> Dumping from hostname : ci
2022-10-20T13:38:11.227757Z|cov-build|66594|info|>
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Platform info:
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Sysname = Linux
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Release = 5.15.0-48-generic
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Machine = x86_64
2022-10-20T13:38:11.227764Z|cov-build|66594|info|>
2022-10-20T13:38:11.227764Z|cov-build|66594|info|>
2022-10-20T13:38:11.227780Z|cov-build|66594|info|> cov-build command: cov-build --dir build/test/icc cmake --build .
2022-10-20T13:38:11.227786Z|cov-build|66594|info|> cov-build expanded command: cov-build --dir build/test/icc cmake --build .
2022-10-20T13:38:11.227957Z|cov-build|66594|info|> build command: /usr/bin/cmake --build .
2022-10-20T13:38:11.227966Z|cov-build|66594|info|> thunk command: /opt/coverity/cov-analysis-2022-3/bin/cov-internal-thunk.sh cmake --build .
2022-10-20T13:38:11.227966Z|cov-build|66594|info|>
2022-10-20T13:38:11.227974Z|cov-build|66594|info|> Set UseSharedCompilation to false.
2022-10-20T13:38:11.227982Z|cov-build|66594|info|> Set COVERITY_BIN to /opt/coverity/cov-analysis-2022-3/bin
2022-10-20T13:38:11.227993Z|cov-build|66594|info|> Set COVERITY_SITE_CC to iccarm
2022-10-20T13:38:11.227999Z|cov-build|66594|info|> Set COVERITY_SITE_CC_CAPTURE_DESCENDANTS to
2022-10-20T13:38:11.228005Z|cov-build|66594|info|> Set COVERITY_TEMP to /tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77
2022-10-20T13:38:11.228015Z|cov-build|66594|info|> Set COVERITY_COMMON_TEMP to /tmp
2022-10-20T13:38:11.228023Z|cov-build|66594|info|> Set COVERITY_IDIR to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228048Z|cov-build|66594|info|> Set COVERITY_OUTPUT to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228053Z|cov-build|66594|info|> Set COVERITY_LOG to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228061Z|cov-build|66594|info|> Set COVERITY_OUTPUT_ENCODING to US-ASCII
2022-10-20T13:38:11.228066Z|cov-build|66594|info|> Set COVERITY_SYSTEM_ENCODING to US-ASCII
2022-10-20T13:38:11.228073Z|cov-build|66594|info|> Set COVERITY_EMIT to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit
2022-10-20T13:38:11.228095Z|cov-build|66594|info|> Set COVERITY_IS_COMPILER to 0
2022-10-20T13:38:11.228100Z|cov-build|66594|info|> Set COVERITY_TOP_PROCESS to 0
2022-10-20T13:38:11.228103Z|cov-build|66594|info|> Set COVERITY_IS_COMPILER_DESCENDANT to 0
2022-10-20T13:38:11.228107Z|cov-build|66594|info|> Set COVERITY_DISENGAGE_EXES to "qemuwrapper;qemu-aarch64;qemu-alpha;qemu-arm;qemu-armeb;qemu-cris;qemu-i386;qemu-m68k;qemu-microblaze;qemu-mips;qemu-mipsel;qemu-nios2;qemu-ppc;qemu-ppc64;qemu-ppc64abi32;qemu-sh4;qemu-sh4eb;qemu-sparc;qemu-sparc32plus;qemu-sparc64;qemu-x86_64"
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228123Z|cov-build|66594|info|> Dumping Environment Variables:
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228142Z|cov-build|66594|info|> JENKINS_HOME=/home/repo/.jenkins
2022-10-20T13:38:11.228146Z|cov-build|66594|info|> GIT_PREVIOUS_SUCCESSFUL_COMMIT=5ecdaedd1ad5f4173cc5aa22a7ff06a2d7aa659b
2022-10-20T13:38:11.228151Z|cov-build|66594|info|> CI=true
2022-10-20T13:38:11.228154Z|cov-build|66594|info|> RUN_CHANGES_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=changes
2022-10-20T13:38:11.228158Z|cov-build|66594|info|> HOSTNAME=ci
2022-10-20T13:38:11.228167Z|cov-build|66594|info|> NODE_LABELS=built-in
2022-10-20T13:38:11.228171Z|cov-build|66594|info|> GIT_COMMIT=c8902b01612b12a90701b3949e8be64e65775ba7
2022-10-20T13:38:11.228175Z|cov-build|66594|info|> HOME=/home/repo
2022-10-20T13:38:11.228179Z|cov-build|66594|info|> HUDSON_COOKIE=94d36788-17b8-4a07-a30e-6e22a28d86dc
2022-10-20T13:38:11.228183Z|cov-build|66594|info|> JENKINS_SERVER_COOKIE=durable-d67ab9cc6fd15cde89a20cb1f752777478da5dc72dc942e65e59bab789c478c1
2022-10-20T13:38:11.228187Z|cov-build|66594|info|> WORKSPACE=/home/repo/.jenkins/workspace/xxx
2022-10-20T13:38:11.228190Z|cov-build|66594|info|> CROSS_ROOT=/opt/iarsystems/bxarm-9.30.1/arm
2022-10-20T13:38:11.228194Z|cov-build|66594|info|> NODE_NAME=built-in
2022-10-20T13:38:11.228198Z|cov-build|66594|info|> RUN_ARTIFACTS_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=artifacts
2022-10-20T13:38:11.228201Z|cov-build|66594|info|> ASM=iasmarm
2022-10-20T13:38:11.228205Z|cov-build|66594|info|> STAGE_NAME=Icc Arm + Coverity
2022-10-20T13:38:11.228209Z|cov-build|66594|info|> EXECUTOR_NUMBER=0
2022-10-20T13:38:11.228213Z|cov-build|66594|info|> GIT_BRANCH=origin/master
2022-10-20T13:38:11.228217Z|cov-build|66594|info|> TERM=xterm
2022-10-20T13:38:11.228220Z|cov-build|66594|info|> RUN_TESTS_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=tests
2022-10-20T13:38:11.228224Z|cov-build|66594|info|> BUILD_DISPLAY_NAME=#324
2022-10-20T13:38:11.228228Z|cov-build|66594|info|> HUDSON_HOME=/home/repo/.jenkins
2022-10-20T13:38:11.228232Z|cov-build|66594|info|> JOB_BASE_NAME=xxx
2022-10-20T13:38:11.228236Z|cov-build|66594|info|> PATH=/opt/coverity/cov-analysis-2022-3/bin:/opt/SEGGER/JLink_V766:/opt/iarsystems/bxarm-9.30.1/common/bin:/opt/iarsystems/bxarm-9.30.1/arm/bin:/opt/gcc-arm-none-eabi-10.3-2021.07/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2022-10-20T13:38:11.228240Z|cov-build|66594|info|> TOOLCHAIN_FILE=../../../cmake/platforms/$TOOLCHAIN_FILENAME
2022-10-20T13:38:11.228244Z|cov-build|66594|info|> BUILD_ID=324
2022-10-20T13:38:11.228247Z|cov-build|66594|info|> BUILD_TAG=jenkins-xxx-324
2022-10-20T13:38:11.228251Z|cov-build|66594|info|> GIT_URL=file:///home/repo/repository
2022-10-20T13:38:11.228255Z|cov-build|66594|info|> BUILD_NUMBER=324
2022-10-20T13:38:11.228259Z|cov-build|66594|info|> JENKINS_NODE_COOKIE=a1e213c4-5eae-41f4-bff8-c26bcc76eacd
2022-10-20T13:38:11.228262Z|cov-build|66594|info|> CXX=iccarm
2022-10-20T13:38:11.228266Z|cov-build|66594|info|> RUN_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect
2022-10-20T13:38:11.228270Z|cov-build|66594|info|> HUDSON_SERVER_COOKIE=e67de7100ca0e18a
2022-10-20T13:38:11.228274Z|cov-build|66594|info|> JOB_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/display/redirect
2022-10-20T13:38:11.228278Z|cov-build|66594|info|> JOB_NAME=xxx
2022-10-20T13:38:11.228282Z|cov-build|66594|info|> PWD=/home/repo/.jenkins/workspace/xxx/build/test/icc
2022-10-20T13:38:11.228286Z|cov-build|66594|info|> GIT_PREVIOUS_COMMIT=6ec26434a11544368ba767770e88c74dd3391906
2022-10-20T13:38:11.228290Z|cov-build|66594|info|> WORKSPACE_TMP=/home/repo/.jenkins/workspace/xxx#tmp
2022-10-20T13:38:11.228293Z|cov-build|66594|info|> CC=iccarm
2022-10-20T13:38:11.228297Z|cov-build|66594|info|> TOOLCHAIN_FILENAME=toolchain-iar-iccarm.cmake
2022-10-20T13:38:11.228301Z|cov-build|66594|info|> COVERITY_PREV_XML_CATALOG_FILES=
2022-10-20T13:38:11.228305Z|cov-build|66594|info|> COVERITY_TOP_CONFIG=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-configure/coverity_config.xml
2022-10-20T13:38:11.228309Z|cov-build|66594|info|> COVERITY_BUILD_INVOCATION_ID=1
2022-10-20T13:38:11.228313Z|cov-build|66594|info|> COVERITY_CONFIG_FILE=/opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228317Z|cov-build|66594|info|> UseSharedCompilation=false
2022-10-20T13:38:11.228321Z|cov-build|66594|info|> COVERITY_BIN=/opt/coverity/cov-analysis-2022-3/bin
2022-10-20T13:38:11.228325Z|cov-build|66594|info|> COVERITY_SITE_CC=iccarm
2022-10-20T13:38:11.228332Z|cov-build|66594|info|> COVERITY_SITE_CC_CAPTURE_DESCENDANTS=
2022-10-20T13:38:11.228336Z|cov-build|66594|info|> COVERITY_TEMP=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77
2022-10-20T13:38:11.228340Z|cov-build|66594|info|> COVERITY_COMMON_TEMP=/tmp
2022-10-20T13:38:11.228344Z|cov-build|66594|info|> COVERITY_IDIR=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228348Z|cov-build|66594|info|> COVERITY_REWRITE_FROM=
2022-10-20T13:38:11.228352Z|cov-build|66594|info|> COVERITY_REWRITE_TO=
2022-10-20T13:38:11.228356Z|cov-build|66594|info|> COVERITY_ENABLE_JAVA_ANNOTATION_FRAMEWORK_SUPPORT=1
2022-10-20T13:38:11.228360Z|cov-build|66594|info|> COVERITY_OUTPUT=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228364Z|cov-build|66594|info|> COVERITY_LOG=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228367Z|cov-build|66594|info|> COVERITY_OUTPUT_ENCODING=US-ASCII
2022-10-20T13:38:11.228371Z|cov-build|66594|info|> COVERITY_SYSTEM_ENCODING=US-ASCII
2022-10-20T13:38:11.228375Z|cov-build|66594|info|> COVERITY_EMIT=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit
2022-10-20T13:38:11.228379Z|cov-build|66594|info|> COVERITY_IS_COMPILER=0
2022-10-20T13:38:11.228383Z|cov-build|66594|info|> COVERITY_TOP_PROCESS=0
2022-10-20T13:38:11.228387Z|cov-build|66594|info|> COVERITY_IS_COMPILER_DESCENDANT=0
2022-10-20T13:38:11.228390Z|cov-build|66594|info|> COVERITY_DISENGAGE_EXES=qemuwrapper;qemu-aarch64;qemu-alpha;qemu-arm;qemu-armeb;qemu-cris;qemu-i386;qemu-m68k;qemu-microblaze;qemu-mips;qemu-mipsel;qemu-nios2;qemu-ppc;qemu-ppc64;qemu-ppc64abi32;qemu-sh4;qemu-sh4eb;qemu-sparc;qemu-sparc32plus;qemu-sparc64;qemu-x86_64
2022-10-20T13:38:11.228395Z|cov-build|66594|info|> COVERITY_COMPILER_PATH_MISMATCH_FILE=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/has_path_mismatches
2022-10-20T13:38:11.228399Z|cov-build|66594|info|> COVERITY_PATHLESS_CONFIGS_FILE=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/has_pathless_configs
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228405Z|cov-build|66594|info|> Dumping configuration:
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228415Z|cov-build|66594|info|> User/default configuration:
2022-10-20T13:38:11.228415Z|cov-build|66594|info|>
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Configuration read from: command-line
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: include Value: /opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: prevent
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: dir Value: /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228421Z|cov-build|66594|info|>
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Configuration read from: /opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: cit_version Value: 1
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: include Value: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/coverity_config.xml
2022-10-20T13:38:11.228444Z|cov-build|66594|info|>
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Configuration read from: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/coverity_config.xml
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: cit_version Value: 1
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: build
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: compiler
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: template_compiler Value: true
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_name Value: iccarm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_translator Value: iar_cxx:arm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_lang Value: C++
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_generic Value: iar/arm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: options
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: id Value: iar_cxx:arm-iccarm-.*
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: opt_preinclude_file Value: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/../user_nodefs.h
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: begin_command_line_config
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: md5 Value: 5f6642eb878a88db1dfb16309fb4338b
2022-10-20T13:38:11.228461Z|cov-build|66594|info|>
2022-10-20T13:38:11.230365Z|cov-build|66594|info|> Using LD_PRELOAD =
/opt/coverity/cov-analysis-2022-3/bin/libcapture-linux64-${PLATFORM}.so
[73713] EXECUTING: /opt/iarsystems/bxarm-9.30.1/arm/bin/ielfdumparm --source test.out
...
[73394] EXECUTING: grep dev
[STATUS] Compiling /home/repo/.jenkins/workspace/xxx/src/nodynalloc/new_del.cpp
/opt/coverity/cov-analysis-2022-3/bin/cov-emit --dir=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc --ignore_path=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-configure --ignore_path=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-repo/ab3163e8db5f4764170d37b222c3d703 --pre_preinclude /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit/ci/config/5092253b194ec0553c3a9de3b66cf08a/iar_cxx_arm-config-0/coverity-macro-compat.h --pre_preinclude /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit/ci/config/5092253b194ec0553c3a9de3b66cf08a/iar_cxx_arm-config-0/coverity-compiler-compat.h --c++ --dollar --allow_qualified_anonymous_unions --allow_global_anonymous_union --no_const_string_literals --unsigned_chars --trigraphs --enable_user_sections --add_type_modifier=__absolute,__big_endian --add_type_modifier=__little_endian --add_type_modifier=__packed,__pcrel --add_type_modifier=__sbrel,__global_reg --add_type_modifier=__coverity_16bit_float --allow_qualified_operator_new_return --lazy_hex_pp_number --short_enums --user_defined_literals --macro_preempts_udl_suffix --ppp_translator "replace/_Mem \*operator new(\[\])? _Mem/*operator new$1" --ppp_translator "replace/operator new mem/operator new" --ppp_translator replace/0.Infinity/1.0\/0.0 --ppp_translator replace/0.Na[Nn]/0.0\/0.0 --allow_injected_template_symbol --arg_dependent_overload --class_scope_noexcept --no_predefined_cplusplus -w --no_predefines --comp_ver 9030001 --char_bit_size=8 --wchar_t_keyword --no_multiline_string --ignore_calling_convention --no_enable_80bit_float --no_enable_128bit_float --macro_stack_pragmas --type_traits_helpers --rtti --inline_keyword --has_include_macro --has_include_next_macro --has_cpp_attribute_macro --no_predefines --preinclude /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/../user_nodefs.h --c++17 --c++17 --no_rtti --no_exceptions --short_enums --gnu_version=50400 --macro_stack_pragmas --add_type_modifier=__data:1,__code --no_stdarg_builtin --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/c --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/c/aarch32 --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/cpp --ppp_translator replace/(#include\s+)u8/$1 --ppp_translator replace/(#define\s+_DLIB_CONFIG_FILE_HEADER_NAME\s+)u8/$1 --ppp_translator replace/(#define\s+_DLIB_CONFIG_FILE_STRING\s+)u8/$1 --ppp_translator replace/(typedef\s+_Align_type<)::/$1 -DNDEBUG -U__EXCEPTIONS -D__coverity_undefine___EXCEPTIONS -D__FAR_RUNTIME_ATTRIBUTE__=__near_func -U__FOR_DEBUG__ -D__coverity_undefine___FOR_DEBUG__ -D__LITTLE_ENDIAN__=1 -U__PLACEMENT_DELETE -D__coverity_undefine___PLACEMENT_DELETE -U__RTTI -D__coverity_undefine___RTTI -U__STDC_VERSION__ -D__coverity_undefine___STDC_VERSION__ -U__coverity_undefine___STDC_VERSION__ -D__coverity_undefine___coverity_undefine___STDC_VERSION__ -U__cpp_exceptions -D__coverity_undefine___cpp_exceptions -U__cpp_rtti -D__coverity_undefine___cpp_rtti --type_sizes=dex8Pfilw4s2 --type_alignments=dex8Pfilw4s2 --size_t_type=j --ptrdiff_t_type=i /home/repo/.jenkins/workspace/xxx/src/nodynalloc/new_del.cpp
[73393] EXECUTING: /bin/mount
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
[73399] EXECUTING: grep dev
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
[73398] EXECUTING: /bin/mount
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/yvals.h", line 159: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
^
[73403] EXECUTING: /bin/mount
[73404] EXECUTING: grep dev
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
...
2022-10-20T13:38:39.392031Z|cov-build|66594|info|> Invoking cov-security-da with commands: /opt/coverity/cov-analysis-2022-3/bin/cov-security-da --dir /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:39.401624Z|cov-build|66594|info|> Dynamic analyzer took 9 ms
2022-10-20T13:38:39.401624Z|cov-build|66594|info|> Build time (cov-build overall): 00:00:28.195804
2022-10-20T13:38:39.401624Z|cov-build|66594|info|>
2022-10-20T13:38:39.402216Z|cov-build|66594|info|> Build time (C/C++ emits total): 00:06:17.288925
2022-10-20T13:38:39.402216Z|cov-build|66594|info|>
2022-10-20T13:38:39.402216Z|cov-build|66594|info|>
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> Emitted 15 C/C++ compilation units (100%) successfully
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> [WARNING] Recoverable errors were encountered during 12 of these C/C++ compilation units.
2022-10-20T13:38:39.402240Z|cov-build|66594|info|>
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> 15 C/C++ compilation units (100%) are ready for analysis
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> For more details, please look at:
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
Regarding the question in the title (how to configure for IAR), your cov-configure command line looks right to me.
The warning messages (function call is not allowed in a constant expression) are from the Coverity compiler, which believes the input is not valid C++, and hence is warning about it. But these warnings appear to be of a kind that will not cause any problem for analysis; the compiler just notes the problem but continues anyway, like with any other compiler warning. (When the analysis runs, if there is a consequence for fidelity, you would see RW.ROUTINE_NOT_EMITTED issues reported.)
Because the problem arises from inside the Coverity compiler, there isn't any easy way for the user to suppress these messages. My recommendation would be to create a minimal reproducer and send it to Coverity support for them to eventually fix in the product. If you really want to fix it yourself, you could probably fix it using a ppp_translator ("ppp" stands for "pre-preprocessor") element in the compiler configuration to rewrite the offending code on the fly, but that's a non-trivial undertaking.
Please see (contains a workaround and also the information with which release it shall be fixed)
https://community.synopsys.com/s/article/warning-59-function-call-is-not-allowed-in-a-constant-expression-if-HAS-NOEXCEPT

how to convert address to lines and file names on windows with PDB files?

I have PDB files and callstack like this
#1 - wseclient.dll+0x121170
#2 - wseclient.dll+0x120024
#3 - wseclient.dll+0x25fbf
I used to use add2line.exe to convert address to lines, but it doesn't work on vs2019, does anybody know is there any other way to convert address on callstack?
Setting up an example
Some sample code to be compiled with Visual Studio 2019:
#include <iostream>
class Test {
public:
__declspec(noinline) static int one()
{
throw std::exception("maximize debugging fun");
}
};
__declspec(noinline) int main()
{
return Test::one();
}
This will create the following call stack when being run in WinDbg:
0:000> k
# ChildEBP RetAddr
...
02 00affa6c 00661316 CallStackDecodingExample!Test::one+0x1d [C:\...\CallStackDecodingExample.cpp # 6]
...
And we can use some calculations to get the numbers back and forth:
0:000> ? CallStackDecodingExample!Test::one+0x1d
Evaluate expression: 6689037 = 0066110d
0:000> ? CallStackDecodingExample
Evaluate expression: 6684672 = 00660000
0:000> ? CallStackDecodingExample+0x110d
Evaluate expression: 6689037 = 0066110d
0:000> ln 0066110d
[C:\...\CallStackDecodingExample.cpp # 6]
(006610f0) CallStackDecodingExample!Test::one+0x1d |
(00661110) CallStackDecodingExample!main
Given the debugger was able to resolve the PDBs correctly, we now have the expected result. Let's try to get this without a debugging session, i.e. neither with live debugging nor with crash dump analysis, but by PDBs + text input.
Getting the address from a DLL + PDB
In WinDbg, use "Open dump file", although you don't have a crash dump file. Instead, open the DLL (wseclient.dll or CallStackDecodingExample.exe for this example).
Then use ln:
0:000> ln CallStackDecodingExample+0x110d
[C:\...\CallStackDecodingExample.cpp # 6]
(004010f0) CallStackDecodingExample!Test::one+0x1d
| (00401110) CallStackDecodingExample!main

Access violation using different c++ runtime build VS 2017

I got an c0000005 memory exception when my program use a newer version of c++ runtime, specifically of msvcp140.dll :
14.16.27012.6 the program works
14.24.28127.4 the program crashes.
My application uses signalrclient library for connecting to our web service. When there’s a problem with the connection, the program crashes with an access violation.
I got the stack from a dump:
00 0b7ff34c 0b7ff370 BC32RECV!__ExceptionPtr::_RethrowException+0x82 [d:\agent\_work\3\s\src\vctools\crt\crtw32\eh\excptptr.cpp # 541]
WARNING: Frame IP not in any known module. Following frames may be wrong.
01 0b7ff350 052b1466 0xb7ff370
02 0b7ff358 052b1561 BC32RECV!std::exception_ptr::_RethrowException+0x6 [c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\exception # 282]
03 0b7ff370 052b395b BC32RECV!std::rethrow_exception+0x31 [c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\exception # 358]
04 0b7ff388 052b3e8f BC32RECV!Concurrency::details::_ExceptionHolder::_RethrowUserException+0x2b [c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\ppltasks.h # 789]
05 0b7ff3d8 052b9d09 BC32RECV!Concurrency::details::_Task_impl_base::_Wait+0x22f [c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\ppltasks.h # 1613]
06 (Inline) -------- BC32RECV!Concurrency::task<unsigned char>::wait+0xf [c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\ppltasks.h # 3297]
07 (Inline) -------- BC32RECV!Concurrency::task<void>::wait+0xf [c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\ppltasks.h # 4223]
08 0b7ffa60 052c75e1 BC32RECV!try_connection+0x479 [c:\my .net projects\builder\main\utility\bc32recv\bc32recv.cpp # 578]
The code of my function is :
try {
client->connection.start().wait(); -> access vio
connection_success = true;
}
catch (std::exception& ex)
{
...
}
It seems it had a different std::exception_ptr, changing version from 14.16.27012.6 to 14.24.28127.4 of msvcp140.dll.
I assumed compatibility was maintained in this case when only the build / minor version changes.
The exception info from the dump is:
0:014> .exr -1
ExceptionAddress: 052c7d2e (BC32RECV!__ExceptionPtr::_RethrowException+0x00000082)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: b0688e75
Attempt to read from address b0688e75
There's a attempt of reading b0688e75 address.
The first frame of the stack reports:
frame 0n0;dv /t /v
00 0b7ff34c 0b7ff370 BC32RECV!__ExceptionPtr::_RethrowException+0x82 [d:\agent\_work\3\s\src\vctools\crt\crtw32\eh\excptptr.cpp # 541]
#ebx              class __ExceptionPtr * this = 0x0a09b2bc
0b7ff2f8          struct _EXCEPTION_RECORD ThisException = struct _EXCEPTION_RECORD
#eax              struct _s_ThrowInfo * pThrow = 0xb0688e69
<unavailable>     struct _s_CatchableType * pType = <value unavailable>
<unavailable>     void * pExceptionBuffer = <value unavailable>
I dont know how to "read" theese infos. What it seems near to the address VAM is
#eax              struct _s_ThrowInfo * pThrow = 0xb0688e69
and it seems wrong:
((BC32RECV!_s_ThrowInfo *)0xffffffffb0688e69) : 0xffffffffb0688e69 [Type: _s_ThrowInfo *]
[+0x000] attributes : Unable to read memory at Address 0xffffffffb0688e69
[+0x004] pmfnUnwind : Unable to read memory at Address 0xffffffffb0688e6d
[+0x008] pForwardCompat : Unable to read memory at Address 0xffffffffb0688e71
[+0x00c] pCatchableTypeArray : Unable to read memory at Address 0xffffffffb0688e75

sass error compiling zurb foundation with !global variable flag

The 'rake --trace assets:precompile' command gives the following error:
rake aborted!
Sass::SyntaxError: Invalid CSS after "...ules: $modules ": expected "}", was "!global;"
(in app/assets/stylesheets/foundation_and_overrides.scss:13)
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/_functions.scss:13
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/components/_global.scss:5
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/components/_grid.scss:5
foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation.scss:9
app/assets/stylesheets/foundation_and_overrides.scss:1327
The error appears to come from line 13 of 'foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/_functions.scss'
8 // IMPORT ONCE
9 // We use this to prevent styles from being loaded multiple times for compenents that rely o n other components.
10 $modules: () !default;
11 #mixin exports($name) {
12 // Import from global scope
13 $modules: $modules !global;
14 // Check if a module is already on the list
15 $module_index: index($modules, $name);
16 #if (($module_index == null) or ($module_index == false)) {
17 $modules: append($modules, $name) !global;
18 #content;
19 }
20 }
The SASS syntax looks fine to me, and compiles without error provided I have made no edits to the generated 'app/assets/stylesheets/foundation_and_overrides.scss.' If I make the smallest change to that file, such as the following, the compilation error occurs.
--- a/app/assets/stylesheets/foundation_and_overrides.scss
+++ b/app/assets/stylesheets/foundation_and_overrides.scss
## -14,7 +14,7 ## $base-font-size: 100% !default;
// Since the typical default browser font-size is 16px, that makes the calculation for grid siz
// If you want your base font-size to be a different size and not have it effect grid size too,
// set the value of $em-base to $base-font-size ($em-base: $base-font-size;)
-$em-base: 16px !default;
+$em-base: 17px !default;
// It strips the unit of measure and returns it
#function strip-unit($num) {
Environment is Rails 4.0.8, foundation-rails 5.5.0.0
The foundation-rails gem has set the lower bounds on their Sass dependency to >= 3.2.0, but are using a Sass 3.3 feature (the !global flag). You'll need to specify a dependency for 3.3 for your project.
I also recommend submitting a bug report to the maintainers of foundation-rails.

perl Inline cpp not working windows 32 bit

I'm using perl Inline::CPP with this sample code from cpan documentation
use Inline CPP;
print "9 + 16 = ", add(9, 16), "\n";
print "9 - 16 = ", subtract(9, 16), "\n";
__END__
__CPP__
int add(int x, int y) {
return x + y;
}
int subtract(int x, int y) {
return x - y;
}
The Error Log
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -type
"C:\strawberry\perl\lib\ExtUtils\typemap" inline_pl_172d.xs > inline_pl_172
sc && C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- inline_pl_
d.xsc inline_pl_172d.c
Didn't find a 'MODULE ... PACKAGE ... PREFIX' line
g++ -c -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEX
DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\
00\" -DXS_VERSION=\"0.00\" "-IC:\strawberry\perl\lib\CORE" inline_pl_17
c
inline_pl_172d.xs:28:2: error: 'MODULE' does not name a type
dmake: Error code 129, while making 'inline_pl_172d.o'
A problem was encountered while attempting to compile and install your Inline
CPP code. The command that failed was:
dmake > out.make 2>&1
The build directory was:
D:\university\phd\data\datamail\Chordata2\_Inline\build\inline_pl_172d
To debug the problem, cd to the build directory, and inspect the output files
at D:\university\phd\data\datamail\Chordata2\inline.pl line 0.
...propagated at C:/strawberry/perl/site/lib/Inline/C.pm line 772.
INIT failed--call queue aborted.
If the package is not installed well on my machine How to know and fix it ?
The your code works for me without modification once I installed Inline::CPP from CPAN...
c:\Perl>
c:\Perl>perl StackOverflow.pl
Set up gcc environment - 3.4.5 (mingw-vista special r3)
9 + 16 = 25
9 - 16 = -7
c:\Perl>
This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Binary build 1603 [296746] provided by ActiveState http://www.ActiveState.com
Built Mar 13 2013 11:29:21
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
c:\Perl>
This is on a Win7 32 bit system running ActivePerl 5.16.3 multi-thread and Inline::CPP 0.46 using the default install settings in the Inline::CPP module setup. From the looks of things Perl appears to be using GCC 3.4.5 as the module compiler...
c:\Perl>gcc -v
Reading specs from C:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-s
jlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)
c:\Perl>
The make utility used is dmake 4.11...
c:\Perl>dmake -V MAKE_VERSION
dmake.exe - Version 4.11-20080107-SHAY (Windows / MS Visual C++)
Copyright (c) 1990,...,1997 by WTI Corp.
Default Configuration:
MAXLINELENGTH := 32766
MAXPROCESSLIMIT := 4
MAXPROCESS := 1
.IMPORT .IGNORE: DMAKEROOT
.MAKEFILES : makefile.mk makefile
.SOURCE : .NULL
DMAKEROOT *= $(ABSMAKECMD:d)startup
MAKESTARTUP := $(DMAKEROOT)\startup.mk
Please read the NEWS file for the latest release notes.
c:\Perl>
Complete Inline::CPP CPAN module install log...
c:\Perl>cpan
Set up gcc environment - 3.4.5 (mingw-vista special r3)
cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.
cpan> install Inline::CPP
Reading 'C:\Perl\cpan\Metadata'
Database was generated on Mon, 28 Oct 2013 11:08:37 GMT
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
Reading 'C:\Perl\cpan\sources\authors\01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
Reading 'C:\Perl\cpan\sources\modules\02packages.details.txt.gz'
Database was generated on Tue, 05 Nov 2013 20:53:02 GMT
Warning: This index file is 40 days old.
Please check the host you chose as your CPAN mirror for staleness.
I'll continue but problems seem likely to happen.
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
Reading 'C:\Perl\cpan\sources\modules\03modlist.data.gz'
............................................................................DONE
Writing C:\Perl\cpan\Metadata
Running install for module 'Inline::CPP'
Running make for D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/D/DA/DAVIDO/CHECKSUMS
Checksum for C:\Perl\cpan\sources\authors\id\D\DA\DAVIDO\Inline-CPP-0.46.tar.gz ok
Scanning cache C:\Perl/cpan/build for sizes
...........................................................................-DONE
DEL(1/2): C:\Perl\cpan\build\Math-Polynomial-1.005-ahaC2G
DEL(2/2): C:\Perl\cpan\build\Math-Polynomial-1.005-ahaC2G.yml
Inline-CPP-0.46/
Inline-CPP-0.46/Makefile.PL
Inline-CPP-0.46/META.yml
Inline-CPP-0.46/README
Inline-CPP-0.46/MANIFEST
Inline-CPP-0.46/TESTED
Inline-CPP-0.46/Changes
Inline-CPP-0.46/MANIFEST.SKIP
Inline-CPP-0.46/t/
Inline-CPP-0.46/t/03prefix.t
Inline-CPP-0.46/t/02basic.t
Inline-CPP-0.46/t/14changes.t
Inline-CPP-0.46/t/11rewrite_config.t
Inline-CPP-0.46/t/04charptr.t
Inline-CPP-0.46/t/07perlcritic.t
Inline-CPP-0.46/t/00load_prereqs.t
Inline-CPP-0.46/t/01fn_cans.t
Inline-CPP-0.46/t/10kwalitee.t
Inline-CPP-0.46/t/06fn_regress.t
Inline-CPP-0.46/t/08cppguess.t
Inline-CPP-0.46/t/09pod_coverage.t
Inline-CPP-0.46/t/13version_numbers.t
Inline-CPP-0.46/t/12custom_libs.t
Inline-CPP-0.46/t/05pod.t
Inline-CPP-0.46/grammar/
Inline-CPP-0.46/grammar/Makefile.PL
Inline-CPP-0.46/grammar/grammar.pm
Inline-CPP-0.46/grammar/t/
Inline-CPP-0.46/grammar/t/03inline.t
Inline-CPP-0.46/grammar/t/02scope.t
Inline-CPP-0.46/grammar/t/10struct.t
Inline-CPP-0.46/grammar/t/01nherit.t
Inline-CPP-0.46/grammar/t/05virt.t
Inline-CPP-0.46/grammar/t/09purevt.t
Inline-CPP-0.46/grammar/t/11minhrt.t
Inline-CPP-0.46/grammar/t/15stvar.t
Inline-CPP-0.46/grammar/t/14const.t
Inline-CPP-0.46/grammar/t/00pod_coverage.t
Inline-CPP-0.46/grammar/t/16varlst.t
Inline-CPP-0.46/grammar/t/13vararg.t
Inline-CPP-0.46/grammar/t/12retlst.t
Inline-CPP-0.46/grammar/t/17memberarray.t
Inline-CPP-0.46/grammar/t/06deflt.t
Inline-CPP-0.46/grammar/t/07static.t
Inline-CPP-0.46/grammar/t/08anon.t
Inline-CPP-0.46/grammar/t/04const.t
Inline-CPP-0.46/CPP.pm
Inline-CPP-0.46/META.json
Inline-CPP-0.46/lib/
Inline-CPP-0.46/lib/Inline/
Inline-CPP-0.46/lib/Inline/CPP/
Inline-CPP-0.46/lib/Inline/CPP/Config.pm
Inline-CPP-0.46/lib/Inline/CPP.pod
CPAN.pm: Building D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Warning: prerequisite Inline version 0.53 not found. at Makefile.PL line 49.
Warning: prerequisite Inline::C version 0.53 not found. at Makefile.PL line 49.
This will configure and build Inline::C++.
What default C++ compiler would you like to use? [C:\Perl\site\bin\g++.exe]
What default libraries would you like to include? [-lstdc++]
Detected <iostream> style headers. ('.h' not needed.)
Checking if your kit is complete...
Looks good
Warning: prerequisite Inline 0.53 not found. We have 0.52.
Warning: prerequisite Inline::C 0.53 not found. We have 0.52.
Writing Makefile for Inline::CPP::grammar
Writing MYMETA.yml and MYMETA.json
Writing Makefile for Inline::CPP
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- DAVIDO/Inline-CPP-0.46.tar.gz ----
Inline::C [requires]
Inline [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Inline::C'
Running make for S/SI/SISYPHUS/Inline-0.53.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/S/SI/SISYPHUS/Inline-0.53.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/S/SI/SISYPHUS/CHECKSUMS
Checksum for C:\Perl\cpan\sources\authors\id\S\SI\SISYPHUS\Inline-0.53.tar.gz ok
Inline-0.53/
Inline-0.53/C/
Inline-0.53/C/C-Cookbook.pod
Inline-0.53/C/C.pm
Inline-0.53/C/C.pod
Inline-0.53/C/Changes
Inline-0.53/C/lib/
Inline-0.53/C/lib/Inline/
Inline-0.53/C/lib/Inline/C/
Inline-0.53/C/lib/Inline/C/ParseRecDescent.pm
Inline-0.53/C/lib/Inline/C/ParseRegExp.pm
Inline-0.53/C/Makefile.PL
Inline-0.53/C/README
Inline-0.53/C/rt/
Inline-0.53/C/rt/grammars.t
Inline-0.53/C/t/
Inline-0.53/C/t/00init.t
Inline-0.53/C/t/01syntax.t
Inline-0.53/C/t/02config.t
Inline-0.53/C/t/03typemap.t
Inline-0.53/C/t/04perlapi.t
Inline-0.53/C/t/05xsmode.t
Inline-0.53/C/t/06parseregexp.t
Inline-0.53/C/t/07typemap_multi.t
Inline-0.53/C/t/08taint.t
Inline-0.53/C/t/08taint_1.p
Inline-0.53/C/t/08taint_2.p
Inline-0.53/C/t/08taint_3.p
Inline-0.53/C/t/09parser.t
Inline-0.53/C/t/10callback.t
Inline-0.53/C/t/11default_readonly.t
Inline-0.53/C/t/12taint_old.t
Inline-0.53/C/t/14void_arg.t
Inline-0.53/C/t/15ccflags.t
Inline-0.53/C/t/16ccflagsex.t
Inline-0.53/C/t/17prehead.t
Inline-0.53/C/t/18quote_space.t
Inline-0.53/C/t/19INC.t
Inline-0.53/C/t/20eval.t
Inline-0.53/C/t/21read_DATA.t
Inline-0.53/C/t/22read_DATA_2.t
Inline-0.53/C/t/23validate.t
Inline-0.53/C/t/bar/
Inline-0.53/C/t/bar/find_me_in_bar.h
Inline-0.53/C/t/foo/
Inline-0.53/C/t/foo/find_me_in_foo.h
Inline-0.53/C/t/prehead.in
Inline-0.53/C/t/soldier_typemap
Inline-0.53/C/t/typemap
Inline-0.53/Changes
Inline-0.53/Inline-API.pod
Inline-0.53/Inline-FAQ.pod
Inline-0.53/Inline-Support.pod
Inline-0.53/Inline.pm
Inline-0.53/Inline.pod
Inline-0.53/kobes.log
Inline-0.53/lib/
Inline-0.53/lib/Inline/
Inline-0.53/lib/Inline/denter.pm
Inline-0.53/lib/Inline/Foo.pm
Inline-0.53/lib/Inline/MakeMaker/
Inline-0.53/lib/Inline/MakeMaker/Changes
Inline-0.53/lib/Inline/MakeMaker.pm
Inline-0.53/Makefile.PL
Inline-0.53/MANIFEST
Inline-0.53/modules/
Inline-0.53/modules/Math/
Inline-0.53/modules/Math/Simple/
Inline-0.53/modules/Math/Simple/Changes
Inline-0.53/modules/Math/Simple/Makefile.PL
Inline-0.53/modules/Math/Simple/MANIFEST
Inline-0.53/modules/Math/Simple/Simple.pm
Inline-0.53/modules/Math/Simple/test.pl
Inline-0.53/README
Inline-0.53/symbols.perl
Inline-0.53/t/
Inline-0.53/t/00init.t
Inline-0.53/t/01usages.t
Inline-0.53/t/02config.t
Inline-0.53/t/03errors.t
Inline-0.53/t/04create.t
Inline-0.53/t/05files.t
Inline-0.53/t/06rewrite_config.p
Inline-0.53/t/06rewrite_config.t
Inline-0.53/t/07rewrite2_config.p
Inline-0.53/t/07rewrite2_config.t
Inline-0.53/t/file
Inline-0.53/ToDo
CPAN.pm: Building S/SI/SISYPHUS/Inline-0.53.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Checking if your kit is complete...
Looks good
Inline::C is packaged with Inline.pm because it is the most commonly used
Inline Language Support Module (ILSM).
See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++), ::CPR,
::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, ::TT,
::Tcl and ::WebChat.
Config.pm indicates that your version of Perl was built with this C compiler:
C:\Perl\site\bin\gcc.exe
I have located this compiler on your system.
Do you want to install Inline::C? [y] y
Writing Makefile for Inline::C
Writing MYMETA.yml and MYMETA.json
Writing Makefile for Inline
Writing MYMETA.yml and MYMETA.json
Fixing Makefile for MSWin32
cp Inline.pod blib\lib\Inline.pod
cp lib/Inline/MakeMaker/Changes blib\lib\Inline\MakeMaker\Changes
cp lib/Inline/denter.pm blib\lib\Inline\denter.pm
AutoSplitting blib\lib\Inline\denter.pm (blib\lib\auto\Inline\denter)
cp Inline.pm blib\lib\Inline.pm
AutoSplitting blib\lib\Inline.pm (blib\lib\auto\Inline)
cp lib/Inline/Foo.pm blib\lib\Inline\Foo.pm
cp Inline-API.pod blib\lib\Inline-API.pod
cp lib/Inline/MakeMaker.pm blib\lib\Inline\MakeMaker.pm
cp Inline-FAQ.pod blib\lib\Inline-FAQ.pod
cp Inline-Support.pod blib\lib\Inline-Support.pod
cp lib/Inline/C/ParseRegExp.pm ..\blib\lib\Inline\C\ParseRegExp.pm
cp C-Cookbook.pod ..\blib\lib\Inline\C-Cookbook.pod
cp C.pm ..\blib\lib\Inline\C.pm
cp C.pod ..\blib\lib\Inline\C.pod
cp lib/Inline/C/ParseRecDescent.pm ..\blib\lib\Inline\C\ParseRecDescent.pm
SISYPHUS/Inline-0.53.tar.gz
C:\Perl\site\bin\dmake.exe -- OK
Running make test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00init.t ............. ok
t/01usages.t ........... ok
t/02config.t ........... ok
t/03errors.t ........... ok
t/04create.t ........... ok
t/05files.t ............ ok
t/06rewrite_config.t ... ok
t/07rewrite2_config.t .. ok
All tests successful.
Files=8, Tests=19, 15 wallclock secs ( 0.11 usr + 0.06 sys = 0.17 CPU)
Result: PASS
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, '..\blib\lib', '..\blib\arch')" t/*.t
t/00init.t .............. ok
t/01syntax.t ............ ok
t/02config.t ............ ok
t/03typemap.t ........... ok
t/04perlapi.t ........... ok
t/05xsmode.t ............ ok
t/06parseregexp.t ....... ok
t/07typemap_multi.t ..... ok
t/08taint.t ............. ok
t/09parser.t ............
This test could take a couple of minutes to run
t/09parser.t ............ ok
t/10callback.t .......... ok
t/11default_readonly.t .. ok
t/12taint_old.t ......... Skipped - applies only to perl 5.6.x
t/12taint_old.t ......... ok
t/14void_arg.t .......... ok
t/15ccflags.t ........... ok
t/16ccflagsex.t ......... ok
t/17prehead.t ........... ok
t/18quote_space.t ....... ok
t/19INC.t ............... ok
t/20eval.t .............. ok
t/21read_DATA.t ......... ok
t/22read_DATA_2.t ....... ok
t/23validate.t .......... ok
All tests successful.
Files=23, Tests=71, 165 wallclock secs ( 0.12 usr + 0.05 sys = 0.17 CPU)
Result: PASS
SISYPHUS/Inline-0.53.tar.gz
C:\Perl\site\bin\dmake.exe test -- OK
Running make install
Prepending C:\Perl\cpan\build\Inline-0.53-JPPUvK/blib/arch C:\Perl\cpan\build\Inline-0.53-JPPUvK/blib/lib to PERL5LIB for 'install'
Installing C:\Perl\site\lib\Inline.pm
Installing C:\Perl\site\lib\Inline.pod
Installing C:\Perl\site\lib\Inline\C.pm
Installing C:\Perl\site\lib\Inline\MakeMaker.pm
Installing C:\Perl\site\lib\Inline\MakeMaker\Changes
Appending installation info to C:\Perl\lib/perllocal.pod
SISYPHUS/Inline-0.53.tar.gz
C:\Perl\site\bin\dmake.exe install -- OK
Inline is up to date (0.53).
Running make for D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Has already been unwrapped into directory C:\Perl\cpan\build\Inline-CPP-0.46-QMmSMq
CPAN.pm: Building D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
cp lib/Inline/CPP/Config.pm blib\lib\Inline\CPP\Config.pm
cp CPP.pm blib\lib\Inline\CPP.pm
cp lib/Inline/CPP.pod blib\lib\Inline\CPP.pod
cp grammar.pm ..\blib\lib\Inline\CPP\grammar.pm
DAVIDO/Inline-CPP-0.46.tar.gz
C:\Perl\site\bin\dmake.exe -- OK
Running make test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00load_prereqs.t ..... # $Config{osname}: MSWin32
# $Config{cc}: C:\Perl\site\bin\gcc.exe
# $Config{gccversion}: 3.4.5 (mingw-vista special r3)
t/00load_prereqs.t ..... ok
t/01fn_cans.t .......... ok
t/02basic.t ............ ok
t/03prefix.t ........... ok
t/04charptr.t .......... ok
t/05pod.t .............. skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/06fn_regress.t ....... ok
t/07perlcritic.t ....... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/08cppguess.t ......... # ExtUtils::CppGuess not installed. This set of tests and diagnostics
# is more thorough when ExtUtils::CppGuess can be loaded.
# Detected basic defaults (Strawberry, etc.).
#
# Compiler guess:
t/08cppguess.t ......... 1/2 # Makefile.PL approach: [C:\Perl\site\bin\g++.exe].
#
# Linker guess:
# Makefile.PL approach: [-lstdc++].
t/08cppguess.t ......... ok
t/09pod_coverage.t ..... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/10kwalitee.t ......... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/11rewrite_config.t ... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/12custom_libs.t ...... ok
t/13version_numbers.t .. skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/14changes.t .......... skipped: Author tests skipped. Set $ENV{RELEASE_TESTING} to run
All tests successful.
Files=15, Tests=29, 22 wallclock secs ( 0.09 usr + 0.05 sys = 0.14 CPU)
Result: PASS
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, '..\blib\lib', '..\blib\arch')" t/*.t
t/00pod_coverage.t .. ok
t/01nherit.t ........ ok
t/02scope.t ......... ok
t/03inline.t ........ ok
t/04const.t ......... ok
t/05virt.t .......... ok
t/06deflt.t ......... ok
t/07static.t ........ ok
t/08anon.t .......... ok
t/09purevt.t ........ ok
t/10struct.t ........ ok
t/11minhrt.t ........ ok
t/12retlst.t ........ ok
t/13vararg.t ........ ok
t/14const.t ......... ok
t/15stvar.t ......... ok
t/16varlst.t ........ ok
t/17memberarray.t ... ok
All tests successful.
Test Summary Report
-------------------
t/11minhrt.t (Wstat: 0 Tests: 38 Failed: 0)
TODO passed: 28-31
Files=18, Tests=79, 89 wallclock secs ( 0.14 usr + 0.00 sys = 0.14 CPU)
Result: PASS
DAVIDO/Inline-CPP-0.46.tar.gz
C:\Perl\site\bin\dmake.exe test -- OK
Running make install
Prepending C:\Perl\cpan\build\Inline-CPP-0.46-QMmSMq/blib/arch C:\Perl\cpan\build\Inline-CPP-0.46-QMmSMq/blib/lib to PERL5LIB for 'install'
Installing C:\Perl\site\lib\Inline\CPP.pm
Installing C:\Perl\site\lib\Inline\CPP.pod
Installing C:\Perl\site\lib\Inline\CPP\Config.pm
Installing C:\Perl\site\lib\Inline\CPP\grammar.pm
Appending installation info to C:\Perl\lib/perllocal.pod
DAVIDO/Inline-CPP-0.46.tar.gz
C:\Perl\site\bin\dmake.exe install -- OK
cpan> exit
Lockfile removed.
c:\Perl>
Hopes this helps.