This is regarding the backend for garbage collection. My problem might be
related to some strange memory fault created by my frontend, but I'll try
here to get some feedback.
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:
This is regarding the backend for garbage collection. My problem might be
related to some strange memory fault created by my frontend, but I'll try
here to get some feedback.
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:
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.
Any ideas?
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 ...
Thanks
> 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.
Okay. I don't know much about the GC stuff, but if you tell me where
this process_root thing is, I might be able to help. I couldn't find it
in a search.