proc getGlobalSelectorAddr*(): ptr Selector[Data] =
var sel = getGlobalSelector()
result = sel.addr
I doubt this can work. It's not only unsafe code, it's probably wrong code, you circumvent the type checker to break the "isolated heaps" rule. No wonder it crashes.
