NetBSD Problem Report #55141

From martin@duskware.de  Sat Apr  4 10:51:11 2020
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7F0701A921E
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  4 Apr 2020 10:51:11 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
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
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD thirdstage.duskware.de 9.99.52 NetBSD 9.99.52 (MODULAR) #323: Fri Apr 3 19:36:53 CEST 2020 martin@thirdstage.duskware.de:/usr/src/sys/arch/sparc64/compile/MODULAR sparc64
Architecture: sparc64
Machine: sparc64
>Description:

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.

>How-To-Repeat:

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:

(gdb)
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.

>Fix:
n/a

NetBSD Home
NetBSD PR Database Search

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