INFO: No output directory specified (--dir) INFO: Using directory: "Test_PSD_Detector_20250815_030500" INFO: Regenerating c-file: Test_PSD_Detector.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./Test_PSD_Detector.c Test_PSD_Detector.instr Info: 'PSD_Detector' is a contributed component. CFLAGS= ----------------------------------------------------------- Generating single GPU kernel or single CPU section layout: ----------------------------------------------------------- Generating GPU/CPU -DFUNNEL layout: ----------------------------------------------------------- DEBUG: CMD: /home/willend/micromamba/bin/mcstas finished INFO: Linting generated code: ./Test_PSD_Detector.c DEBUG: CMD: cppcheck ./Test_PSD_Detector.c --check-level=exhaustive --force -DMCDEFAULT_NCOUNT=1000000 -UMC_PORTABLE -DND_BUFFER=10000000 -UNOABSORB_INF_NAN -UOMPI_MPI_H -DSIGABRT -DSIGBREAK -DSIGBUS -DSIGPE -DSIGHUP -DSIGILL -DSIGINT -DSIGKILL -DSIGUSR1 -DSIGUSR2 -DSIGPIPE -DSIGQUIT -DSIGSEGV -DSIGTRAP -DSIGURG -DSIGFPE -DSIGKILL -DSIGTERM -UTEST -UUSE_OPENCL -UWIN32 -UOPENACC -UGCCOFFLOAD -U_MSC_VER -U_MSC_EXTENSIONS -U_WIN32 -UWIN32 -D__unix__ -UDANSE -UFUNNEL -UMC_ANCIENT_COMPATIBILITY -UMC_POL_COMPAT -UNEUTRONICS -Uisnan -Uisinf Checking Test_PSD_Detector.c ... Checking Test_PSD_Detector.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1... Test_PSD_Detector.c:12209:5: warning: If memory allocation fails, then there is a possible null pointer dereference: E_p [nullPointerOutOfMemory] E_p[i] = Table_Index(Part_He_3_p,i,0); ^ Test_PSD_Detector.c:12205:26: note: Assuming allocation function fails E_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12205:9: note: Assignment 'E_p=(double*)malloc(_comp->_parameters.nH_p*sizeof(double))', assigned value is 0 E_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12209:5: note: Null pointer dereference E_p[i] = Table_Index(Part_He_3_p,i,0); ^ Test_PSD_Detector.c:12210:9: warning: If memory allocation fails, then there is a possible null pointer dereference: E_p [nullPointerOutOfMemory] if (E_p[i] != Table_Index(Part_Stop_p,i,0)) { ^ Test_PSD_Detector.c:12205:26: note: Assuming allocation function fails E_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12205:9: note: Assignment 'E_p=(double*)malloc(_comp->_parameters.nH_p*sizeof(double))', assigned value is 0 E_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12210:9: note: Null pointer dereference if (E_p[i] != Table_Index(Part_Stop_p,i,0)) { ^ Test_PSD_Detector.c:12215:5: warning: If memory allocation fails, then there is a possible null pointer dereference: dEdx_p [nullPointerOutOfMemory] dEdx_p[i] = PressureConv*Table_Index(Part_He_3_p,i,1) + PressureStop*Table_Index(Part_Stop_p,i,1); ^ Test_PSD_Detector.c:12207:29: note: Assuming allocation function fails dEdx_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12207:12: note: Assignment 'dEdx_p=(double*)malloc(_comp->_parameters.nH_p*sizeof(double))', assigned value is 0 dEdx_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12210:16: note: Assuming condition is false if (E_p[i] != Table_Index(Part_Stop_p,i,0)) { ^ Test_PSD_Detector.c:12215:5: note: Null pointer dereference dEdx_p[i] = PressureConv*Table_Index(Part_He_3_p,i,1) + PressureStop*Table_Index(Part_Stop_p,i,1); ^ Test_PSD_Detector.c:12217:17: warning: If memory allocation fails, then there is a possible null pointer dereference: E_p [nullPointerOutOfMemory] FullEnergyP = E_p[nH_p-1]; ^ Test_PSD_Detector.c:12205:26: note: Assuming allocation function fails E_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12205:9: note: Assignment 'E_p=(double*)malloc(_comp->_parameters.nH_p*sizeof(double))', assigned value is 0 E_p = (double *) malloc(nH_p*sizeof(double)); ^ Test_PSD_Detector.c:12210:16: note: Assuming condition is false if (E_p[i] != Table_Index(Part_Stop_p,i,0)) { ^ Test_PSD_Detector.c:12217:17: note: Null pointer dereference FullEnergyP = E_p[nH_p-1]; ^ Test_PSD_Detector.c:12223:30: warning: If memory allocation fails, then there is a possible null pointer dereference: DAP [nullPointerOutOfMemory] for (i=0; i_parameters.nH_p*sizeof(double))', assigned value is 0 DAP = (double *) malloc((nH_p)*sizeof(double)); ^ Test_PSD_Detector.c:12223:30: note: Null pointer dereference for (i=0; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 MuAP = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12226:3: note: Null pointer dereference MuAP[0] = 0; ^ Test_PSD_Detector.c:12227:30: warning: If memory allocation fails, then there is a possible null pointer dereference: MuAP [nullPointerOutOfMemory] for (i=1; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 MuAP = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12227:30: note: Null pointer dereference for (i=1; i_parameters.nH_p*sizeof(double))', assigned value is 0 DAP = (double *) malloc((nH_p)*sizeof(double)); ^ Test_PSD_Detector.c:12227:45: note: Null pointer dereference for (i=1; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 MuAP = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12232:63: note: Null pointer dereference for (i=1; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 TempVar34 = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12237:30: note: Null pointer dereference for (i=0; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 TempVar34 = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12238:45: note: Null pointer dereference for (i=0; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 TempVar34 = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12239:30: note: Null pointer dereference for (i=0; i_parameters.nH_p+1)*sizeof(double))', assigned value is 0 TempVar34 = (double *) malloc((nH_p+1)*sizeof(double)); ^ Test_PSD_Detector.c:12240:45: note: Null pointer dereference for (i=0; i_parameters.nH_p*sizeof(double))', assigned value is 0 ETP1 = (double *) malloc((nH_p)*sizeof(double)); ^ Test_PSD_Detector.c:12245:28: note: Null pointer dereference for (i=0; i_parameters.nH_p*sizeof(double))', assigned value is 0 PTP1 = (double *) malloc((nH_p)*sizeof(double)); ^ Test_PSD_Detector.c:12248:28: note: Null pointer dereference for (i=0; i_parameters.nH_p*sizeof(double))', assigned value is 0 PTP1 = (double *) malloc((nH_p)*sizeof(double)); ^ Test_PSD_Detector.c:12253:52: note: Null pointer dereference for (i=1; i_parameters.nH_p*sizeof(double))', assigned value is 0 ETP1 = (double *) malloc((nH_p)*sizeof(double)); ^ Test_PSD_Detector.c:12253:62: note: Null pointer dereference for (i=1; i_parameters.nH_t*sizeof(double))', assigned value is 0 E_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12263:5: note: Null pointer dereference E_t[i] = Table_Index(Part_He_3_t,i,0); ^ Test_PSD_Detector.c:12264:9: warning: If memory allocation fails, then there is a possible null pointer dereference: E_t [nullPointerOutOfMemory] if (E_t[i] != Table_Index(Part_Stop_t,i,0)) { ^ Test_PSD_Detector.c:12259:26: note: Assuming allocation function fails E_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12259:9: note: Assignment 'E_t=(double*)malloc(_comp->_parameters.nH_t*sizeof(double))', assigned value is 0 E_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12264:9: note: Null pointer dereference if (E_t[i] != Table_Index(Part_Stop_t,i,0)) { ^ Test_PSD_Detector.c:12269:5: warning: If memory allocation fails, then there is a possible null pointer dereference: dEdx_t [nullPointerOutOfMemory] dEdx_t[i] = PressureConv*Table_Index(Part_He_3_t,i,1) + PressureStop*Table_Index(Part_Stop_t,i,1); ^ Test_PSD_Detector.c:12261:29: note: Assuming allocation function fails dEdx_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12261:12: note: Assignment 'dEdx_t=(double*)malloc(_comp->_parameters.nH_t*sizeof(double))', assigned value is 0 dEdx_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12264:16: note: Assuming condition is false if (E_t[i] != Table_Index(Part_Stop_t,i,0)) { ^ Test_PSD_Detector.c:12269:5: note: Null pointer dereference dEdx_t[i] = PressureConv*Table_Index(Part_He_3_t,i,1) + PressureStop*Table_Index(Part_Stop_t,i,1); ^ Test_PSD_Detector.c:12271:17: warning: If memory allocation fails, then there is a possible null pointer dereference: E_t [nullPointerOutOfMemory] FullEnergyT = E_t[nH_t-1]; ^ Test_PSD_Detector.c:12259:26: note: Assuming allocation function fails E_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12259:9: note: Assignment 'E_t=(double*)malloc(_comp->_parameters.nH_t*sizeof(double))', assigned value is 0 E_t = (double *) malloc(nH_t*sizeof(double)); ^ Test_PSD_Detector.c:12264:16: note: Assuming condition is false if (E_t[i] != Table_Index(Part_Stop_t,i,0)) { ^ Test_PSD_Detector.c:12271:17: note: Null pointer dereference FullEnergyT = E_t[nH_t-1]; ^ Test_PSD_Detector.c:12279:30: warning: If memory allocation fails, then there is a possible null pointer dereference: DAT [nullPointerOutOfMemory] for (i=0; i_parameters.nH_t*sizeof(double))', assigned value is 0 DAT = (double *) malloc((nH_t)*sizeof(double)); ^ Test_PSD_Detector.c:12279:30: note: Null pointer dereference for (i=0; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 MuAT = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12282:3: note: Null pointer dereference MuAT[0] = 0; ^ Test_PSD_Detector.c:12283:30: warning: If memory allocation fails, then there is a possible null pointer dereference: MuAT [nullPointerOutOfMemory] for (i=1; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 MuAT = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12283:30: note: Null pointer dereference for (i=1; i_parameters.nH_t*sizeof(double))', assigned value is 0 DAT = (double *) malloc((nH_t)*sizeof(double)); ^ Test_PSD_Detector.c:12283:40: note: Null pointer dereference for (i=1; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 MuAT = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12288:59: note: Null pointer dereference for (i=1; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 TempVar35 = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12293:30: note: Null pointer dereference for (i=0; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 TempVar35 = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12294:45: note: Null pointer dereference for (i=0; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 TempVar35 = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12295:30: note: Null pointer dereference for (i=0; i_parameters.nH_t+1)*sizeof(double))', assigned value is 0 TempVar35 = (double *) malloc((nH_t+1)*sizeof(double)); ^ Test_PSD_Detector.c:12296:45: note: Null pointer dereference for (i=0; i_parameters.nH_t*sizeof(double))', assigned value is 0 ETT1 = (double *) malloc((nH_t)*sizeof(double)); ^ Test_PSD_Detector.c:12301:28: note: Null pointer dereference for (i=0; i_parameters.nH_t*sizeof(double))', assigned value is 0 PTT1 = (double *) malloc((nH_t)*sizeof(double)); ^ Test_PSD_Detector.c:12304:28: note: Null pointer dereference for (i=0; i_parameters.nH_t*sizeof(double))', assigned value is 0 PTT1 = (double *) malloc((nH_t)*sizeof(double)); ^ Test_PSD_Detector.c:12309:52: note: Null pointer dereference for (i=1; i_parameters.nH_t*sizeof(double))', assigned value is 0 ETT1 = (double *) malloc((nH_t)*sizeof(double)); ^ Test_PSD_Detector.c:12309:62: note: Null pointer dereference for (i=1; i