Closed davidgaleano closed 5 months ago
You are right. It was due to the zero copy refactor.
I have fixed it now in master and verified with examples/nfsclient-listservers (which uses broadcast rpc over udp to detect any local nfs servers)
I will add a test too so that I catch it if it regresses.
Thanks for the quick fix.
The pointer
rpc->pdu
is null when callingrpc_process_reply
.Seems to be related to the changes done for Zero Copy READ3 (https://github.com/sahlberg/libnfs/commit/5e8f7ce273308eb77f94248f4501e574a703c1a5). The previous code was finding the pdu before processing the reply, the new code is broken for UDP connections.
Please note that GDB points the crash at
msg.body.rbody.reply.areply.verf = _null_auth;
but in reality the instruction that generates the seg fault is the next lineif (pdu->zdr_decode_bufsize > 0) {