Discussion:
SegFault
(too old to reply)
Pinto Don Joshua
2004-02-03 22:34:40 UTC
Permalink
Hi,

I'm getting a segmentation fault in DestroySATSolver...

Any comments???

If I comment that destroy statement it works fine....

Thanks
Alexander Smith
2004-02-03 23:46:02 UTC
Permalink
If you are getting a seg fault in destroySATSolver(), then you have a bug
somewhere. There is no bug in destroySATSolver(). Most likely, your clause
lists are not terminated with NULL pointers. Check your insertLiteral()
function to make sure that you are *always* setting 'nextLit' properly.

Remember, C does NOT initialize memory for you. If you malloc() memory (or
declare a variable), it might conceivably have any random value. You have
to set it to some well-defined value yourself. For example, if you want it
to be NULL, then you must set it to be NULL.

Alexander
Post by Pinto Don Joshua
Hi,
I'm getting a segmentation fault in DestroySATSolver...
Any comments???
If I comment that destroy statement it works fine....
Thanks
Loading...