Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10340

Segmentation violation associated with TSocket::Recv

    XMLWordPrintable

Details

    Description

      I am able to reliably produce seg faults in a minimal TSocket example by simply sending 5 characters to the listening port.  To reproduce, run this in one session (root -b server.C):

      {
        auto ss = new TServerSocket(9090, kTRUE);
        auto sock = ss->Accept();
        char buf[1024];
        if(sock) sock->Recv(buf, 1024);
      }

      and this in another:

       

      echo 12345 | nc -v localhost 9090
      

      The same thing happens when using TSocket::Recv(TMessage *&mess) and the same thing happens with the net tutorial hserv2.C.

      The actual seg fault seems to be taking place in tobuf in Bytes.h.

       

       

       

       

       

       

      Attachments

        Activity

          People

            slinev Serguei Linev
            50f2b6d01c60730399de Scott Wakely
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: