NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/55141: libpcap build is broken

>Number:         55141
>Category:       lib
>Synopsis:       libpcap build is broken
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 04 10:55:00 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.52
The NetBSD Foundation, Inc.
System: NetBSD 9.99.52 NetBSD 9.99.52 (MODULAR) #323: Fri Apr 3 19:36:53 CEST 2020 sparc64
Architecture: sparc64
Machine: sparc64

The build for our in-tree libpcap seems to be broken. This causes failure
of shmif_dumpbus (at least).

The difference seems to be whether ENABLE_REMOTE is defined or not, that is
the struct has an rmt_samp member or not. We define it in CPPFLAGS and I
don't see anything obvious that gets compiled where it is not set.


gdb shmif_dumpbus
break pcap_open_dead_with_tstamp_precision
break pcap_dump_open
run -p pcap shmbus

then print sizeof the passed struct pcap when it hits the breakpoints:

4011            p = malloc(sizeof(*p));
(gdb) p sizeof(*p)
$4 = 648
(gdb) p p->rmt_samp
$12 = {method = 0, value = 0}
Breakpoint 1, pcap_dump_open (p=0x40256000, fname=0xffffffffffffdbea "pcap")
    at /usr/src/external/bsd/libpcap/lib/../dist/sf-pcap.c:792
792     {
(gdb) n
(gdb) p sizeof(*p)
$7 = 640
(gdb) p p->rmt_samp
There is no member named rmt_samp.


Home | Main Index | Thread Index | Old Index