Closed gabrielmer closed 1 month ago
Whenever we called callback(RET_OK, unsafeAddr msg[0], cast[csize_t](len(msg)), userData) with msg being an empty string, we got a segfault.
callback(RET_OK, unsafeAddr msg[0], cast[csize_t](len(msg)), userData)
msg
Changed de data type of msg to cstring instead of nim strings, which fixes the segfault.
cstring
Additionally, fixed the usage of foreignThreadGc and added usage of handleRes in missing parts
foreignThreadGc
handleRes
You can find the image built from this PR at
quay.io/wakuorg/nwaku-pr:3108
Built from 7933fd1f896b3678149f6def38916d6c6c501558
Description
Whenever we called
callback(RET_OK, unsafeAddr msg[0], cast[csize_t](len(msg)), userData)
withmsg
being an empty string, we got a segfault.Changed de data type of
msg
tocstring
instead of nim strings, which fixes the segfault.Additionally, fixed the usage of
foreignThreadGc
and added usage ofhandleRes
in missing partsChanges
cstring
for libwaku's response messagesforeignThreadGc
as part of its code was unreachable when returninghandleRes
in missing partsIssue
3039