SIGSEGV: Illegal storage access. (Attempt to read from nil?)
jots opened this issue · comments
jots commented
Thank you for creating this!
I'm trying to use it like:
# after nimble install https://github.com/ba0f3/dnsclient.nim
import dnsclient
let client = newDNSClient()
client.sendQuery("google.com") # cannot specify MX: Error: undeclared identifier: 'MX'
running it I get:
./getdns
Traceback (most recent call last)
getdns.nim(6) getdns
dnsclient.nim(47) sendQuery
streams.nim(86) setPosition
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
however if I run you dnsclient it works fine. any ideas?
Huy Doan commented
Are you using devel version of Nim?
jots commented
nim --version
Nim Compiler Version 0.18.0 [Linux: amd64]
I think your code is good because if I just run your dnsclient it works fine. it's only when i try to use it as a library. pretty sure I'm doing something wrong.
Huy Doan commented
First of all, I forgot to export definations from private/protocol. Second, this lib is stil in WIP, it does not support 'authority' section yet.
i will try to finish it as soon as I have spare time
jots commented
thank you.
Huy Doan commented
I just made some progress, just give it try :)