2025-05-07 06:50 ftp://ftp.de.debian.org/debian/pool/main/p/pycaml/pycaml_0.82.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=python --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 8e656e5 (2025-05-06 23:42:00 +0200) count: 25 25 elapsed-time: 0.1 0.1 head-timing-info: old-timing-info: head results: pycaml/pycaml_ml.c:62:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable v [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:72:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable v [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:89:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable value [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:98:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable value [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:106:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:171:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rv [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:1264:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable retv [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:1302:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:1318:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:1341:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rv [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:1368:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyMethodDef [valueFlowBailoutIncompleteVar] pycaml/pycaml_ml.c:90:6: warning: If memory allocation fails, then there is a possible null pointer dereference: v [nullPointerOutOfMemory] pycaml/pycaml_ml.c:89:31: note: Assuming allocation function fails pycaml/pycaml_ml.c:89:16: note: Assignment 'v=(value*)malloc(sizeof(value)+size)', assigned value is 0 pycaml/pycaml_ml.c:90:6: note: Null pointer dereference pycaml/pycaml_ml.c:91:36: warning: Possible null pointer dereference: aux_str [nullPointer] pycaml/pycaml_ml.c:890:35: note: Calling function 'camlwrap', 2nd argument 'NULL' value is 0 pycaml/pycaml_ml.c:91:36: note: Null pointer dereference pycaml/pycaml_ml.c:269:10: warning:inconclusive: If resource allocation fails, then there is a possible null pointer dereference: f [nullPointerOutOfResources] pycaml/pycaml_ml.c:264:12: note: Assuming allocation function fails pycaml/pycaml_ml.c:264:12: note: Assignment 'f=fdopen(fd,"r+")', assigned value is 0 pycaml/pycaml_ml.c:269:10: note: Null pointer dereference pycaml/pycaml_ml.c:1376:2: warning: If memory allocation fails, then there is a possible null pointer dereference: methods [nullPointerOutOfMemory] pycaml/pycaml_ml.c:1368:34: note: Assuming allocation function fails pycaml/pycaml_ml.c:1368:34: note: Assignment 'methods=malloc(sizeof(PyMethodDef)*Wosize_val(funclist))', assigned value is 0 pycaml/pycaml_ml.c:1376:2: note: Null pointer dereference pycaml/pycaml_ml.c:1377:2: warning: If memory allocation fails, then there is a possible null pointer dereference: methods [nullPointerOutOfMemory] pycaml/pycaml_ml.c:1368:34: note: Assuming allocation function fails pycaml/pycaml_ml.c:1368:34: note: Assignment 'methods=malloc(sizeof(PyMethodDef)*Wosize_val(funclist))', assigned value is 0 pycaml/pycaml_ml.c:1377:2: note: Null pointer dereference pycaml/pycaml_ml.c:1378:2: warning: If memory allocation fails, then there is a possible null pointer dereference: methods [nullPointerOutOfMemory] pycaml/pycaml_ml.c:1368:34: note: Assuming allocation function fails pycaml/pycaml_ml.c:1368:34: note: Assignment 'methods=malloc(sizeof(PyMethodDef)*Wosize_val(funclist))', assigned value is 0 pycaml/pycaml_ml.c:1378:2: note: Null pointer dereference pycaml/pycaml_ml.c:1379:2: warning: If memory allocation fails, then there is a possible null pointer dereference: methods [nullPointerOutOfMemory] pycaml/pycaml_ml.c:1368:34: note: Assuming allocation function fails pycaml/pycaml_ml.c:1368:34: note: Assignment 'methods=malloc(sizeof(PyMethodDef)*Wosize_val(funclist))', assigned value is 0 pycaml/pycaml_ml.c:1379:2: note: Null pointer dereference pycaml/pycaml_ml.c:91:21: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] pycaml/pycaml_ml.c:89:31: note: Assuming allocation function fails pycaml/pycaml_ml.c:89:16: note: Assignment 'v=(value*)malloc(sizeof(value)+size)', assigned value is 0 pycaml/pycaml_ml.c:91:21: note: Null pointer addition pycaml/pycaml_ml.c:38:43: style: Parameter 'dst' can be declared as pointer to const [constParameterPointer] pycaml/pycaml_ml.c:88:38: style: Parameter 'aux_str' can be declared as pointer to const [constParameterPointer] pycaml/pycaml_ml.c:91:21: portability: '(void*)v' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] pycaml/pycaml_ml.c:98:21: portability: '(void*)v' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] pycaml/pycaml_ml.c:180:9: style: Variable 'reflect' is assigned a value that is never used. [unreadVariable] pycaml/pycaml_ml.c:1331:4: style: Variable 'x' is assigned a value that is never used. [unreadVariable] diff: 2.17.0 pycaml/pycaml_ml.c:91:21: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] pycaml/pycaml_ml.c:89:31: note: Assuming allocation function fails pycaml/pycaml_ml.c:89:16: note: Assignment 'v=(value*)malloc(sizeof(value)+size)', assigned value is 0 pycaml/pycaml_ml.c:91:21: note: Null pointer addition head pycaml/pycaml_ml.c:91:21: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] pycaml/pycaml_ml.c:89:31: note: Assuming allocation function fails pycaml/pycaml_ml.c:89:16: note: Assignment 'v=(value*)malloc(sizeof(value)+size)', assigned value is 0 pycaml/pycaml_ml.c:91:21: note: Null pointer addition DONE