Menu
  • HOME
  • TAGS

KdTree C implementation resulting in core dump

c,coredump,kdtree

You declare the variable v as a pointer to struct node, but you don't initialize this pointer. Uninitialized local (non-static) variables have an indeterminate value. Using an uninitialized local (non-static) variable leads to undefined behavior, which is a very common reason for crashes. Modern compilers are good at detecting the...

segmentation fault core dump in kruskal's algorithm

c,segmentation-fault,coredump

Without trying to decipher what the code is actually about (single-letter variables, zero comments, no link to this "Kruskal's algorithm" or anything), and in addition to what I already wrote in my comment about adding printf()s to log intermediate values, checking scanf() return codes, mirroring user input back at the...

How to set breakpoints and make it break when debugging core dump with gdb?

gdb,coredump

You can restart your program once loading the core if you want to trace the steps leading to the crash. Use 'start', this will take you to the first line in your program. Then set breakpoints between main() and the crash point. See sample below: <pre> [[email protected] src]$ gdb -n...

fgets not reading complete line in C

c,pointers,readfile,fgets,coredump

Your coding problem is in : fgets(rowbuffer,sizeof(rowbuffer),fp) sizeof(rowbuffer) will give you only the size of the pointer, not the size of the memory allocated to the pointer. To resolve the issue, you need to supply the proper size of the allocated memory [cols * ( sizeof(float)+sizeof(char)] to fgets(). Your logical...

what is the reason for core dump? stack shows from oracle lib

c++,oracle11g,coredump

Looks like its issue of oracle 11g Starting from Oracle 11g Diagnostic Repositories are turned on by default. Automatic Diagnostic Repository (ADR) Parameters such as DIAG_SIGHANDLER_ENABLED, DIAG_ADR_ENABLED, DIAG_DDE_ENABLED are mostly set at SQLNET.ORA. Having DIAG_SIGHANDLER_ENABLED will force all diagnostics to be written such as alert logs, trace files, application dumps...

How to create a core dump even if the process is normally running? [duplicate]

c,linux,debugging,remote-debugging,coredump

Call gdb, then attach pid gcore where pid is the process id of the process in question....

if a linux program exit with coredump, the unclosed files may lead a resource leak

linux,coredump,resource-leak

It will close them as well. Although core dump abruptly terminates the program, the OS can still perform all normal clean-up routines it would do if the program terminated correctly.

Bash shell script get core dump error

java,shell,centos,jetty,coredump

And finally I find out the reason for core dump. It's because the kill part. kill will not kill the process right away , there is some time delay,that's why I always get core dump error. I add a for loop to check whether this process is completely killed ,...

segmentation fault issue # n

c++,segmentation-fault,coredump

As you've indicated yourself, the size of A (tm) is 3371 x 3371. The file REL.txt contains numbers like 3383 (line 138 in the file) which are larger than the dimensions of A. This makes you reach out of bounds in this part, as indicated by the debugger: for(i=0;i<div;i+=2) {...

C++ program dies when making a library call

c++,unix,solaris,coredump

I fixed the issue. It was a silly mistake of mine. Eventhough I compiled the library with the new function, I didnt add it to the testing environment. The testing environment had the older version of the library without the new function API But quite surprised that the fucntion call...

Error with stoi and debugged with gdb [closed]

c++,c++11,segmentation-fault,coredump

Yeah, I think you're doing something pretty silly. You probably compiled the first code, which doesn't have the std::cout statement, and you probably executed the compilation steps without -std=c++11 which would result in std::stoi not being included beecause std::stoi is from C++11 and onward. The result is still the old...

Segmentation fault (core dumped) in c

c,arrays,segmentation-fault,coredump

I can identify three issues in your program and would list them in progression of severity (Code Error) Array size is not the same as size of an array object for(i=0;i<sizeof(arr);i++) Your assumption that the sizeof would return you the array size (no of elements) is wrong. sizeof is used...

Segmentation fault (core dumped) while performing strcat using pointers

c,segmentation-fault,malloc,coredump,c-strings

Below code should work: #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char *str1 ; char *str2 ; char *str3; int l1,l2,l3; str1 = (char*)malloc(10); str2 = (char*)malloc(10); strcpy(str1,"United" ); strcpy(str2,"Front" ); l1 = strlen(str1)+1; l2 = strlen(str2)+1; l3 = l1 + l2; str3 = (char *)malloc(l3); str3 =...

Gsv::buffer error

c++,gtkmm,coredump,gtksourceview

You create a pointer, but you don't actually make it point anywhere. In essence, buffer is a null pointer. From the RefPtr default constructor refernece: Afterwards it will be null and use of -> will cause a segmentation fault. You need to explicitly create the object pointed to, using the...

Segmentation fault (core dumped) C++ as I use a lot of memory [duplicate]

c++,memory,segmentation-fault,coredump

The data are allocated on stack. Stacks have limited size and cannot be resized. Allocate such large blocks on heap with std::vector or new[].

Why does scikit-learn cause core dumped?

python,scikit-learn,coredump

Going out on a limb here, but does your laptop by any chance have an AMD CPU? AMD have removed support for the 3DNow! instructions from their more recent processors (source), which a trawl of Ubuntu and Debian bugtrackers shows that many people are being hit by (eg 1, 2,...

Another coredump issue in C

c++,c,segmentation-fault,coredump

I would think you would need to add check on your externally accepted values (using assert might be a start) Like : checking tm>0 ler>0 C[i]<tm A[i]!=NULL B[i]!=NULL As mentionned in the comment it an off by one issue : in LER the values should be from 0 to tm-1...

Generating core dumps of web apps

linux,remote-server,buffer-overflow,coredump,exploit

Ok, i got the answer to this. Kuba you are right! The user machine and the server is actually the same computer! What he did was crashing the server from localhost, to discover a potential buffer overflow vulnerability, for PoC. The video is on Youtube, and it's called "Overflow Exploitation,...

My Lex code receiving segmentation fault (core dump) at line *yy_cp = yy_hold_char

parsing,segmentation-fault,yacc,lex,coredump

I have answer of my own question. Here are some explanation of Solution I have two .Lex (Type1_Lex.l & Type2_Lex.l)and two .Yacc (Type1_Yacc.y & Type2_Yacc.y) code I am compiling all and relevant .c (Type1_Lex.c, Type2_Lex.c, Type1_Yacc.c & Type2_Yacc.v) and .h files are getting generated And further compilation of .c with...

How to analyze memory leak from coredump

c,coredump,gcore

Memory leak can be be evaluated with core dump. I have taken a sample c++ example: class Base { public: virtual void fun(){} virtual void xyz(){} virtual void lmv(){} virtual void abc(){} }; class Derived: public Base { public: void fun(){} void xyz(){} void lmv(){} void abc(){} }; void...

get N-th byte from mmaped file

c,memory,segmentation-fault,mmap,coredump

I'm guessing you also need read permissions in your mmap: PROT_WRITE | PROT_READ