segmentation-fault

C Program terminating with -1 (0xFFFFFFFF), seemingly no reason?

#include <stdio.h> typedef struct pduct {char name[20]; int price; int stock;} PRODUCT; void init(PRODUCT * product) { printf("What is the name of the product: "); fgets(product->name, 20, stdin); printf("DEBUG: Did it get written...: %s", product->name); printf("What is th...

SystemC Seg Fault on sc_core::sc_in<bool>::read()

Hello, I am having a repeating seg fault while using SystemC. During initialization I set a value to 0. During operation of a testbench I am setting this value to 1 in a module (proc). This is a sc_signal variable that is attached to a port of another module imem. The input port is of type sc_in. In theory, this assignment should c...

Segmentation fault when ANDing enum

I have a class CField and a class CBoard containing a 2d array of CField. When I do this: board(0,0)->Is (CField::CHECK) I get a segfault in Is() method. GDB points me right after the &, so I think it's related to it. What's the cause? Full code: http://pastebin.com/vetShYsL - header http://pastebin.com/pGNPpa8N - source ...

Why is this C method segfaulting?

I'm writing an immutable linked list class in C, but one method is mysteriously segfaulting. The code is intended to be roughly equivalent to this: class PList(object): def __init__(self, first, rest=None): self.first = first self.rest = rest def cons(self, item): return PList(item, self) Here is my c...

Seg fault? Can you find it? cause I can't

I've looked over this about 15 times by now to no avail. I cannot understand why this is seg faulting? It doesn't even get to the "print" statement which makes no sense. the error codes actually do work tho (when I dont have a shared memory present) I have a load.c program but it works perfectly (im 100% sure of this) #include <stdio.h>...

uTidylib segmentation fault

uTidylib is crashing and giving me a segmentation fault every time I try to use it. Here's some info about the crash: Process: Python [432] Path: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: ??? (???) Code Type: X86-...