So Root should be a valid pointer to the program stack. It traces two
roots before the segmentation fault.
Well, Root may be valid, but combining "%p" with *Root probably isn't.
Btw, can I run llvm-db with llvm assembly as source language?
Yes, but you'd have to manually insert the debugging support information
which would be tedious. You'd be better off doing something like writing
a debug info insertion pass and applying it to the Module. This way you
can use llvmAsmParser to get a module, apply the pass and then the
bcwriter to create the bytecode with the debug info in it.
Okay. I'm not an expert on GC but I'll take a look ...
> For some strange reason I get segmentation fault in process_pointer in
> semispace.c (I've implemented a small collector, hopefully :). The fault
> occurs when I do:
> printf("process_root[0x%p] = 0x%p\n", (void*) Root, (void*) *Root);
> I.e, when I reference Root.
I don't know what "Root" is but possibly the %p substitution with
"*Root" isn't valid.
Hmm, ok, that was in the file when I checked it out from the cvs. The
point is that is crashes when using *Root, no matter how, even when not
using it in the printf.