New answers tagged

0 votes

Docker: ng build: Segmentation fault error

I could resolve the issue. So here the solution for completeness. Solution Got to Docker Desktop/Settings/General switch "Choose file sharing implementation for your containers" to gRPC ...
Palmos's user avatar
  • 1
0 votes

gdb address out differ from std::cout -> where is my mistake?

thanks a lot for the lot comments and answers! the solution was the following: #pragma pack(push, 4) typedef struct { struct{ unsigned char bit_1 : 1; unsigned char bit_2 : 1; ...
noCPPie's user avatar
0 votes

gdb address out differ from std::cout -> where is my mistake?

The problem does not reproduce using gcc (GCC) 13.2.1 20240316 (Red Hat 13.2.1-7) and GNU gdb (Fedora Linux) 14.1-4.fc39: gdb -q ./a.out Reading symbols from ./a.out... (gdb) b b::init Breakpoint 1 at ...
Employed Russian's user avatar
0 votes

strcpy() throwing segmentation fault for unknown reasons

At least this problem: Insufficient allocation Allocation 1 too small. No room for the null character. str = realloc(str, size * sizeof(char)); *(str + i) = c; ... } .....
chux - Reinstate Monica's user avatar
0 votes

torch.load() Segmentation fault (core dumped)

In my case, I have tested all versions of nvidia drivers, but it is useless. So I searched the Internet and came out to update BIOS, so I updated it and it worked. Update BIOS. https://github.com/...
Yunjung Kim's user avatar
1 vote

strcpy() throwing segmentation fault for unknown reasons

In the line strncpy(addrstr, argv[1], 4); you're copying at most 4 characters from argv[1] to addrstr. The documentation of strncpy()says: No null-character is implicitly appended at the end of ...
Diego Ferruchelli's user avatar
0 votes

Palindrome function in asm x86 32-bit

What's wrong with my program? jmp exit exit: Jumping to a label directly beneath is a redundant operation. The execution can just as well fall-through. mov bl,[esi] mov edi ,array mov ebx,[...
Sep Roland's user avatar
  • 36.7k
0 votes

Django- Program terminated with signal SIGABRT, Aborted

#3 0x00007f59984b82fc in malloc_printerr (str=str@entry=0x7f59985d844d "corrupted size vs. prev_size") This error means: there is heap corruption (heap buffer overflow, using memory after ...
Employed Russian's user avatar
0 votes

Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

SDK is from here It's a bug, probably in the SDK you downloaded. You should contact the SDK developers, as they are the only ones that would be able to do something about it.
Employed Russian's user avatar
1 vote
Accepted

How do I step through a broken MySQL plugin?

Attach gdb to the mysqld process and set a breakpoint at your function generate_auth_string_hash. Then single step through your program. Use p to print information like variable values.
danblack's user avatar
  • 13.6k
2 votes

Calling `free` syscall for the first element array of void* in C

The C standard does not guarantee anything about using memory that is released from allocation. By and large, the memory management routines are merely bureaucratic record-keeping routines. They track ...
Eric Postpischil's user avatar
4 votes

Calling `free` syscall for the first element array of void* in C

When you attempt to access memory that has already been freed, or attempt to free memory more than once, that triggers undefined behavior in your code. With undefined behavior, your program may crash, ...
dbush's user avatar
  • 215k
0 votes
Accepted

Unable to store a pointer to a class in C++

C++ (and the C++ std library) defaults to value based semantics. A std::vector<X> is a value. If you create a copy of it, you also copy all of its contents. _selectedModel = &_collection....
Yakk - Adam Nevraumont's user avatar
1 vote

Traversing linked list in raylib gives Segmentation fault (core dumped)

I don't know Raylib, but... In the first case it's obvious that you're doing a second pass through the while (!WindowShouldClose()) without resetting the first pointer. The three iterations of the ...
Diego Ferruchelli's user avatar
0 votes

Java SIGSEGV error when running from docker

I solved a same SIGSEGV error in eclipse-temurin:17-jre-alpine image using this steps in Dockerfile: RUN apk --no-cache add gcompat ENV LD_PRELOAD=/lib/libgcompat.so.0 More details and source is here....
Omid Estaji's user avatar
0 votes

Segmentation Fault in unexpected location when I add a for loop to main

Note that 1) given my code below in the part where I print the "value is:..." the correct working of the code only prints "Value is: 13" and does not print "Value is: 100"...
David C. Rankin's user avatar
0 votes

Segmentation Fault in unexpected location when I add a for loop to main

because the left and left children of your new left1 and left2 structs are not initialized, there is a problem with the pointing of the two structs, there is a wild pointer situation, so there is a ...
djk's user avatar
  • 1
3 votes

My code keeps failing with a segmentation fault but I don't allocate any memory

[Per my top comment], building with -Wall -O0 -g -fsanitize=address, a few issues ... With -Wall, arguments col and row are char and compiler complains about that (converted to int) row and col are ...
Craig Estey's user avatar
  • 32.3k
0 votes
Accepted

Bug in Clang code generation for member initializers in objects on x86-64 when page alignment off?

SOLVED: In _start the stack is already aligned so by popping 8 bytes off in my startup code I was actually misaligning it before the call to main(). The SysV x86-64 ABI requires the stack be aligned ...
Carl E. Thompson's user avatar
1 vote
Accepted

Segfault when re-implementing tolower() in C

Many issues: char *variable[40]; - it is an array of 40 pointers to char. Those pointers are not initialized. When you dereference any of them, you invoke undefined behaviour. You want an array of ...
gulpr's user avatar
  • 4,387
0 votes

Bug in Clang code generation for member initializers in objects on x86-64 when page alignment off?

Linked with the -n (--nmagic) linker option to turn off page alignment of ELF sections Q. Doctor, it hurts when I do that. A. Have you tried not doing that? Clang (quite reasonably) assumes that it ...
Employed Russian's user avatar
3 votes
Accepted

Closing a file after a segmentation fault occurs in C

Modern operating systems will automatically clean up OS resources like files and allocated memory, so the file will be closed after a crash like this. However if using standard library I/O (FILE* or ...
SoronelHaetir's user avatar
0 votes
Accepted

How to properly call an object method in ruby C api?

Ok, so this seems to work fine: // Main fuzzer static VALUE mHtmlTokenizer = Qnil; int main(int argc, char** argv) { ruby_init(); VALUE cFoo = rb_define_class("Foo", rb_cObject); ...
Some nerd who does not have a 's user avatar
0 votes

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

After reeboting the syste, its working fine, but its keep on coming wheb tensorflow is using
mahanth967's user avatar
1 vote

happening segment fault when i use pthread_create

One bug is that your thread callback lacks a return in some of the execution paths. Meaning it will likely crash each time the thread finishes. If you enable compiler warnings and pay attention to ...
Lundin's user avatar
  • 204k

Top 50 recent answers are included