NetBSD Problem Report #37166
From c.turner@199technologies.org Sun Oct 21 13:19:23 2007
Return-Path: <c.turner@199technologies.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 3D27E63B8FE
for <gnats-bugs@gnats.netbsd.org>; Sun, 21 Oct 2007 13:19:23 +0000 (UTC)
Message-Id: <471B51C3.1060800@199technologies.org>
Date: Sun, 21 Oct 2007 09:18:59 -0400
From: Chris Turner <c.turner@199technologies.org>
Reply-To:
To: gnats-bugs@NetBSD.org
Subject: Re: pkgsrc/36518
>Number: 37166
>Category: pkg
>Synopsis: Re: pkgsrc/36518
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: linux-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sun Oct 21 13:20:00 +0000 2007
>Closed-Date: Sat Dec 30 18:30:36 +0000 2017
>Last-Modified: Sat Dec 30 18:30:36 +0000 2017
>Originator: Chris Turner <c.turner@199technologies.org>
>Release:
>Organization:
>Environment:
>Description:
Managed to get this to compile, but it still crashes..
Notes:
- pkgsrc makefile is using pkg_select-20050817
per MASTER_SITES http://imil.net/NetBSD/, pkg_select-20051209.tar.gz is
availabl
e.
- Compliation problems are 3:
- '-Werrror' is picky and some warnings stop the build
updated internal Makefile to use NOGCCERROR to work around
this per pkg/share/bsd.sys.mk
- __RCSID was not defined. Attempted to use libnbcompat's version, but
didn't have the nbcompat-foo to get this hooked in. Instead,
just deleted __RCSID versions.
- no strlcpy per gnu-c library. changed to strncpy which isn't as
good after checking for libnbcompat availability of same (not there)
Perhaps strlcpy into nbcompat += nbcompatization might fix things..
Also, perhaps trying w/o optimization or on gcc3+linux might be
better..
output from 'gcc --version':
gcc (GCC) 4.2.1 (Debian 4.2.1-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
output from '/lib/libc.so.6':
GNU C Library stable release version 2.6.1, by Roland McGrath et al.
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.2.1 (Debian 4.2.1-3).
Compiled on a Linux >>2.6.20.15<< system on 2007-08-23.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
-- 8< -- patch -- 8< --
diff -urw pkg_select.orig/Makefile pkg_select.compiles-crashes/Makefile
--- pkg_select.orig/Makefile 2007-10-20 23:24:18.000000000 +0000
+++ pkg_select.compiles-crashes/Makefile 2007-10-20
23:19:38.000000000 +0
000
@@ -5,6 +5,7 @@
curses_input.c
WARNS= 3
+NOGCCERROR=1 # avoid gcc4 -Werror pickyness (per pkg bsd.sys.mk,v
1.1.1.1 )
CFLAGS+= -g -I.
CFLAGS+= -DPKGSRCBASE=\"/usr/pkgsrc\" -DPKGDB=\"/var/db/pkg\"
diff -urw pkg_select.orig/curses_helpers.c
pkg_select.compiles-crashes/curses_he
lpers.c
--- pkg_select.orig/curses_helpers.c 2005-05-12 11:03:09.000000000 +0000
+++ pkg_select.compiles-crashes/curses_helpers.c 2007-10-20
23:20:26.0000
00000 +0000
@@ -298,7 +298,7 @@
mvwprintw(popup, y, x + dispw + 1, " ");
}
- strlcpy(dispbuf, (char *) (buf + offset), dispw + 1);
+ strncpy(dispbuf, (char *) (buf + offset), dispw + 1);
mvwprintw(popup, y, x + 1, fmt, dispbuf);
wmove(popup, y, x + 1 + pos);
diff -urw pkg_select.orig/ftpio.c pkg_select.compiles-crashes/ftpio.c
--- pkg_select.orig/ftpio.c 2005-05-12 10:35:58.000000000 +0000
+++ pkg_select.compiles-crashes/ftpio.c 2007-10-20 23:19:48.000000000 +0000
@@ -1,9 +1,6 @@
/* $NetBSD: ftpio.c,v 1.61 2003/12/20 02:37:49 grant Exp $ */
#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.61 2003/12/20 02:37:49 grant Exp $");
-#endif
/* slightly modified version of ftpio.c with pkg_select integration */
diff -urw pkg_select.orig/main.c pkg_select.compiles-crashes/main.c
--- pkg_select.orig/main.c 2005-08-17 08:16:19.000000000 +0000
+++ pkg_select.compiles-crashes/main.c 2007-10-20 23:19:58.000000000 +0000
@@ -33,13 +33,6 @@
*/
#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char *rcsid = "$Id: main.c,v 1.39 2005/08/17 08:16:19 imil Exp $";
-#else
-__RCSID("$Id: main.c,v 1.39 2005/08/17 08:16:19 imil Exp $");
-#endif
-#endif
#include <stdlib.h>
#include <signal.h>
Only in pkg_select.compiles-crashes: pkg_select.cat1
-- 8< -- crash output -- 8< --
*** glibc detected *** ./pkg_select: free(): invalid next size (fast):
0x0805c00
8 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7e94e25]
/lib/libc.so.6(cfree+0x90)[0xb7e988f0]
./pkg_select[0x804ceaf]
./pkg_select[0x804cbdb]
./pkg_select[0x8052bd5]
./pkg_select[0x804adbe]
/lib/libc.so.6(__libc_start_main+0xe0)[0xb7e41050]
./pkg_select[0x8049c71]
======= Memory map: ========
08048000-0805a000 r-xp 00000000 fc:00 531687
/usr/pkgsrc/pkgtools/pkg_select
/work/pkg_select/pkg_select
0805a000-0805c000 rw-p 00011000 fc:00 531687
/usr/pkgsrc/pkgtools/pkg_select
/work/pkg_select/pkg_select
0805c000-0809e000 rw-p 0805c000 00:00 0 [heap]
b7d00000-b7d21000 rw-p b7d00000 00:00 0
b7d21000-b7e00000 ---p b7d21000 00:00 0
b7e1b000-b7e25000 r-xp 00000000 fc:00 394151 /lib/libgcc_s.so.1
b7e25000-b7e26000 rw-p 00009000 fc:00 394151 /lib/libgcc_s.so.1
b7e26000-b7e27000 rw-p b7e26000 00:00 0
b7e27000-b7e29000 r-xp 00000000 fc:00 394669 /lib/libdl-2.6.1.so
>How-To-Repeat:
>Fix:
Unknown
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->linux-pkg-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sat, 08 Mar 2008 07:11:02 +0000
Responsible-Changed-Why:
Sort out mangled PR.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/37166: Re: pkgsrc/36518
Date: Sat, 8 Mar 2008 07:45:00 +0000
> [stuff about pkg_select on linux, dated Oct 21 2007]
Was this meant to be marked confidential?
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 30 Dec 2017 18:30:36 +0000
State-Changed-Why:
Duplicate of PR pkg/36518.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.