Segmentation fault on large array sizes

The following code gives me a segmentation fault when run on a 2Gb machine, but works on a 4GB machine. int main() { int c[1000000]; cout << "done\n"; return 0; } The size of the array...

gcc, c++: static string member variarible causes heap corruption/segmentation fault

I have a big application that uses the dynamically loaded libraries. At the end of program while terminating it either segfaults or spits a message "glibc detected corrupted double-linked list"....

Memory leak checking on Windows with QT and MinGW32

Lately I have been developing in C++ with QT Creator. All is well and I'm nearly at the point of packaging and distributing my application. But obviously before any release you better make sure...

Segmentation fault - std::_Rb_tree

I'm going through some crashes in my application and would like to know if anyone can help. gdb: http://pastebin.com/tW6HzY2Y What can cause this? I'm using Ubuntu 10.04.3. Edit: Look likes the...

C++ pointer to vector

I have to insert elements into a pointer to a vector.I have written the following code but it is giving segmentation fault. Could someone please point out what are the errors in this code or how...

What causes a Python segmentation fault?

I am implementing Kosaraju's Strong Connected Component(SCC) graph search algorithm in Python. The program runs great on small data set, but when I run it on a super-large graph (more than 800,000...

Linux heap structure and the behaviour with malloc() and free()

I have a Debian with a Linux 2.6 Kernel, and I try to understand how the heap works/behaves with malloc() and free(). I tried to search for malloc() and free() algorithm and heap structure, but I...

Parsing SIP message body

I'm implementing SIP protocol and I'm stuck while parsing SIP message. I'm using the oSIP library. My code is like that: #include <stdio.h> #include <stdlib.h> #include <osip2/osip.h> #include...

NSDocument Directory path issue in iPad?

I am working in iPad application, Using Xcode 4.3.2 to develop my app, i have get the pdf file (URL) from web service and that pdf file download in NSDocumentDirectory path then retrieve the pdf...

Segmentation Fault CUDA-C

I am using CUDA to add two matrices, and to give their result in another matrix. I wish to make use of shared memory feature, and for this, I wrote the following: #include <stdio.h> #include...

Priority Queue of pointers C++

class Edge; class Node { public: Node(): distance(numeric_limits<double>::infinity()), visited(false) {} Node(string a_id): distance(numeric_limits<double>::infinity()),...

Segmentation Fault (Core Dumped) issue windows to linux

I have been using Visual Studio on Windows to program and my code works fine, but when running it on Ubuntu I get a "Segmentation fault (core dumped)" issue and I don't know what it causing it. I...

unable to execute command: Segmentation fault: 11 swift frontend command failed due to signal (use -v to see invocation)

I have an iOS swift program that compiles and runs fine on Xcode Beta2. When I downloaded beta4, I got a few syntax errors for the new swift language which I corrected. I now get this...

Segmentation fault core dumped when reading file

I got segmentation fault (core dumped) error in line 24 (fgets). I'm not very familliar with c, but I had to make a program for my classes. I have following code: #include <stdio.h> #include...

'python' command segmentation fault on raspberry pi

My problem is fairly simple: running the 'python' command (not a script) on my raspberry pi model A+ running Raspbian Wheezy gives a segmentation fault: [email protected] ~ $ python Segmentation...

Composer hanging while updating dependencies

I tried updating a Laravel project I'm working on today using composer update But it hung on Updating dependencies (including require-dev) So I tried things like updating composer, dump-autoload,...

thread_local vector segmentation fault at end of program in C++

I'm trying to make a multi-threaded program but am having a weird problem with thread local vectors. Here's the (stripped-down to only have the error) code: #include <vector> #include...

Java - is there a thread safe way to allocate new objects without locks?

Okay, so I realize that all threads share the heap, which contains all the objects that have been allocated for a java program. this means if multiple threads try to allocate a new object, then...

c++ strange Segmentation fault appears

Description SFDD and Manager are classes that I created myself, following is my test file for testing class SFDD. (You can skip them and check the my test results) #include <iostream> #include...

source file not found according to gdb info source

I am debugging a C application running with a dynamically linked shared library. The program runs well on Ubuntu 14.04 64 bit. But it generates segmentation fault on Ubuntu 16.04 when Linux...

Segmentation Fault on FloatType Images ITK

I get a segmentation fault when trying to display or apply any filter to an ikt::Image with float pixel types. I can use this same code (swapping the pixel types) to open an image with unsigned...

Matlab-Python compiler SDK fails with "undefined symbol: XML_SetHashSalt"

I am working on Ubuntu 16.04 64-bit with Matlab R2018a and using Python 3.6 (and 3.5 and 2.7 installed but not using). I have a Matlab code which am trying to call from Python by using and...

vscode is not running and gives segmentation fault

Just updated form vscode 1.23.1 to 1.27.2 I cannot open form menu so I tried from terminal it shows the segmentation error. /usr/bin/code: line 35: 8228 Segmentation fault (core dumped)...

Why the memory allocation failed when passing the pointer as argument

I just tried two piece of code to allocate contiguous memory for a 2D array and use g++ to compile the code. The second piece of code works well but the fisrt one will lead to Segmentation fault...

ios - swift - read MDM config from UserDefaults

I am trying to read the mdm config from UserDefaults but it keeps crashing. The code is pretty straight forward: let defaults = UserDefaults.standard; let serverConfig =...

Segmentation fault with fgets

I am doing a simple program just for opening a file and printing its contents line by line, but I get "Segmentation fault (core dumped)" while compiling with "gcc -o test pruebas.c" (my file is...

segmentation fault in imshow in opencv python3

i have installed opencv in python by python3 -m pip install opencv-python i am currently on macOS 10.15.6 the pip list shows opencv-python 4.4.0.40 in list cv2 has been imported but it is...

Why does scanf() appear to load an address lower than that of the buffer I am writing to?

I wrote a C program with an intentional buffer overflow for a class assignment. In my program, I have a main function to accept a name from the user as a character array of length 50. The name is...

NPM scripts stop working in nodeJS version 4

I am working on a legancy project and it requires to use nodeJs version 4. My development machine is - Windows 10 64 bit. I am using NVM to manage node version. None of my NPM scripts work in...

How to access members of 2 classs in each other

I have an application that I am making in C++ using wxWidgets. I put all the GUI code in one single file up until now but, recently I have been trying to break individual section of the app into...