Mudflap crashes when it sees an accept in the form of: accept(lsock, NULL, NULL) and does not crash upon: accept(lsock, &addr, &len); The former case is - AFAIK - legal, quoting from the accept() manpage: 'When addr is NULL nothing is filled in.' Attached is a minimal C program to reproduce this bug. I tried this both on 4.0.0 and 4.0.1.
Created attachment 9369 [details] C program to reproduce this mudflap bug Compiled with: gcc -o mudflaptest mudflaptest.c -Wall -fmudflap -lmudflap
Confirmed by looking at the source.
patch committed
Subject: Bug 23084 CVSROOT: /cvs/gcc Module name: gcc Changes by: fche@gcc.gnu.org 2005-09-23 21:58:42 Modified files: libmudflap : ChangeLog mf-hooks2.c Log message: 2005-09-23 Frank Ch. Eigler <fche@elastic.org> PR 23084. * mf-hooks2.c (accept): Tolerate NULL sockaddr* parameter. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/ChangeLog.diff?cvsroot=gcc&r1=1.72&r2=1.73 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libmudflap/mf-hooks2.c.diff?cvsroot=gcc&r1=1.14&r2=1.15