NetBSD Problem Report #55141

From  Sat Apr  4 10:51:11 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 7F0701A921E
	for <>; Sat,  4 Apr 2020 10:51:11 +0000 (UTC)
Subject: libpcap build is broken
X-Send-Pr-Version: 3.95

>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.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.