Skip to content

SIGSEV when receiving UDP packets > 16/17 bytes #159

@gopherbot

Description

@gopherbot

by azummo-google@towertech.it:

package main

import (
        "fmt";
        "net";
        "os";
)

func main()
{
        conn, _ := net.ListenPacket("udp", "0.0.0.0:1234");

        fmt.Printf("waiting on %s...\n", conn.LocalAddr().String());

        var buf [1000]byte;

        for {
                n, _, err := conn.ReadFrom(&buf);

                if err == os.EAGAIN {
                        continue;
                }

                fmt.Printf("got %d bytes\n", n);
        }
}

on linux/686, changeset:   4031:b2ccee5ff169


./test &
echo "012345678901234567890" | netcat -u localhost 1234

SIGSEGV: segmentation violation
Faulting address: 0x39383736
PC=0x808198a
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions