[LLVMdev] CollectorRegistry

Simon Ask Ulsnes vinterbleg at gmail.com
Sat Jul 26 10:35:18 PDT 2008


I have a few additional questions, that aren't immediately crucial:

1) The implementation of EscapeEnumerator in ShadowStackCollector.cpp
doesn't seem to handle setjmp/longjmp. I could also imagine this would
be a bit complicated to implement reliably (even though setjmp.h does
not guarantee that the stack is intact when returning as the result of
a longjmp). Has this case been considered?

2) In ShadowStackCollector a linked list is used to keep track of the
roots, which seems sensible (quick insertion and deletion, but slow
lookup, but collections are rare), but I suppose this list would
quickly be corrupted if more than one thread would use the garbage
collector at the same time. One solution would be to use thread local
storage for the linked lists (pthread_getspecific or similar). Is this
conclusion correct, and does the proposed solution sound like a really
bad idea to you?

- Simon :-)



More information about the llvm-dev mailing list