13,613 questions
0
votes
0
answers
164
views
Can a segfault occur if you are doing iterator arithmetic ops beyond limits?
it -> a random valid vector iterator
const int kLookAheadIndex -> a random number
auto it_ahead = std::max(it - kLookAheadIndex, path.cbegin()); // get a look-ahead point to look at
I know ...
-4
votes
0
answers
93
views
SIGSEV signal after method call - How do pointers work after pass-by-reference?
While implementing a Dijkstra-Search on a Graph, I call a seperate method to perform the search, handing it a pointer to my nodes and direct values for start/endpoint and array size. Notably,t he ...
0
votes
1
answer
91
views
C++ segmentation fault when throwing in ordered OMP parallel for
the code below crashes with
terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >'
Aborted ...
3
votes
5
answers
259
views
Why does strlen(NULL) cause a compile-time warning, while my custom ft_strlen(NULL) only crashes at runtime?
I'm trying to reimplement the standard strlen function in C, and I'm closely replicating its behavior. I defined my function based on standard C declaration for strlen:
size_t ft_strlen(const char *s);...
0
votes
0
answers
54
views
SIGSEGV in boost::stacktrace::frame::source_line when accessing thread_local storage on macOS 15 Clang 17 intel; Boost bug or Clang bug or macOS bug?
We have a C++20 library that compiles several Boost modules and statically links their object files into our shared library. One of those modules is Boost.Stacktrace. We compile this library, and a ...
0
votes
2
answers
108
views
Basic Quill logging example segfaults?
I'm trying to run the basic console Quill logging library example found here:
#include "quill/Backend.h"
#include "quill/Frontend.h"
#include "quill/LogMacros.h"
#include ...
0
votes
1
answer
57
views
SIGSEGV in new FxCanvas
I am trying to create a java FX based visual in an editor.
As a first step I tried to create an FXCanvas like this:
public class ModelEditorView extends EditorPart {
public static String ID = &...
4
votes
1
answer
106
views
Segfault due to conflicting types in independent compilation units (g++)
I came across an issue that leads to a segfault and I'm totally in the dark as to why this is happening. I managed to recreate the issue in a fairly minimal working example, see below.
I was trying to ...
0
votes
0
answers
78
views
Example code segfaults with no indication why
I am trying to learn eBPF with the project https://github.com/masmullin2000/libbpf-sample/.
The simple program works perfectly fine but when I try to use the ringbuffer I get a segmentation fault when ...
1
vote
0
answers
32
views
DOCA Switch Application segmentation fault
Environment:
Hardware: BlueField-2, model MBF2H516A-CEEOT
OS: Linux version 5.15.0-1060-bluefield (buildd@bos03-arm64-114)
DOCA SDK: 2.10.0087
Description:
I'm trying to run the doca_switch sample ...
1
vote
1
answer
89
views
C (Linux) setting a stack variable char test[-some large number] - causes segfault - kernel config setting?
I'm learning C.
I'm building a P2P content distribution system and as part of that system there is a section of code which reads the network. To receive the data I set a buffer:
char raw_buf[4096]...
2
votes
0
answers
87
views
Assembly IA-32: Segmentation fault after function returns to caller
I'm writing a simple function in Assembly IA-32 (AT&T syntax), but I get segmentation fault when I run it. I think I'm doing some mess on the stack, but I can't really see what I'm doing wrong.
...
0
votes
1
answer
143
views
Injection in an Elf x86-64 failed because of SEGV_ACCERR (gdb, nasm, c)
For a school project I have to inject any x86-64 Elf with a parasite which is basically an array of bytes (a string).
The basic behaviour is :
print the string "....STRNG....\n"
decipher the ...
2
votes
0
answers
95
views
Segmentation fault during Serialization: caused by message as a field in C++17
This post is related to this one: Segmentation fault during Serialization by using protobuf in C++17
But I have narrowed it down to the specific problem and decided to make separated post.
My goal is ...
2
votes
1
answer
183
views
Dlang application crashes with "Segmentation fault: 11" on macOS 15.4
After upgrading macOS from 15.3.1 to 15.4, my D executable crashes with Segmentation fault: 11.
I've tried using lldb to figure out what's going on, but am not sure what this reveals:
* thread #1, ...
0
votes
0
answers
43
views
macOS Assembly: Preventing Segmentation Fault When Calling ___error() in System Call Error Handling [duplicate]
I'm working on implementing a custom read function in x86_64 assembly for macOS and encountering an intriguing issue with error handling.
When implementing system call error management, I need to set ...
2
votes
1
answer
88
views
Segmentation Fault during open() of JSON file in Python 3.8
I am encounting a segmentation fault in my Python application, which utilizes MQTT to send requests to a service. The service then writes the response into a JSON file, which the application ...
0
votes
1
answer
65
views
Segfault in LLVM
I have the following short LLVM program that is resulting in a segfault. I'm hoping someone can either tell me why or tell me how I can find out.
This is a much simplified version of code generated ...
2
votes
0
answers
53
views
Segmentation Fault in VM management C++ program [closed]
I write program which manage virtual machines between hosts. I have an information about CPU and RAM that VM needs and RAM+CPU information about host. I can add VM to host, replace some VR with the ...
0
votes
1
answer
51
views
Overloading + Operator in C++ for Symbol Class and Avoiding Code Duplication
I am creating a binary tree representation of a mathematical expression for performing differentaiton and integration on it.
I am trying to overload the + operator for my Symbol class. It works fine ...
1
vote
0
answers
63
views
curl_easy_getinfo delete writedata object
I have the following code that generates a segmentation fault:
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
#define API_BASE_PATH "...
2
votes
4
answers
236
views
SIMD load across memory boundary doesn't cause segfault?
Suppose I do a (unaligned) packed load _mm256_loadu_pd on a double (see code snippet below). Does this violate the strict aliasing rule or otherwise result in undefined behavior as per C++ standard? ...
1
vote
0
answers
152
views
Android Emulator Received SIGSEGV on AARCH64 Linux OS Caused By Thread Local Variable Conflict
I want to use Android Emulator in AARCH64, OS is openEuler 22.03 LTS SP1 (CentOS-like), and I tried many versions from ci.android.com, but they all failed because of SIGSEGV.
I got Android Emulator ...
0
votes
1
answer
115
views
c cpputest pointer mock segfault
I have a segfault occurring because I have a cpputest mock which returns a pointer to a struct, at the point that the mock is called, and inside the mock itself, the address of the struct is something ...
0
votes
0
answers
25
views
worker_threads, loading ffi-napi in a mult-threads causes "Segmentation Fault" on close thread
I’m working on an API for tax issuance and using a library in .so format. The library is available here, and you can download it here. i split task with worker_threads.js
I’m starting a new worker ...