NetBSD Problem Report #52516
From www@NetBSD.org Thu Aug 31 17:13:20 2017
Return-Path: <www@NetBSD.org>
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" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id F09B07A180
for <gnats-bugs@gnats.NetBSD.org>; Thu, 31 Aug 2017 17:13:19 +0000 (UTC)
Message-Id: <20170831171318.EAAA17A282@mollari.NetBSD.org>
Date: Thu, 31 Aug 2017 17:13:18 +0000 (UTC)
From: root@localhost.local
Reply-To: root@localhost.local
To: gnats-bugs@NetBSD.org
Subject: nawk leaking
X-Send-Pr-Version: www-1.0
>Number: 52516
>Category: toolchain
>Synopsis: nawk leaking
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 31 17:15:00 +0000 2017
>Closed-Date: Fri Dec 08 06:01:55 +0000 2017
>Last-Modified: Fri Dec 08 06:01:55 +0000 2017
>Originator: guy incognito
>Release: cvs head
>Organization:
encom
>Environment:
Linux iamreallysorryaboutthisbugreport 4.12.0-1-amd64 #1 SMP Debian 4.12.6-1 (2017-08-12) x86_64 GNU/Linux
>Description:
=================================================================
==10908==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 3 byte(s) in 1 object(s) allocated from:
#0 0x45e610 in __strdup (/tmp/src/external/historical/nawk/dist/awk+0x45e610)
#1 0x532a6d in tostring /tmp/src/external/historical/nawk/dist/tran.c:441:6
#2 0x51571c in yylex /tmp/src/external/historical/nawk/dist/lex.c:204:31
#3 0x50d0e8 in yyparse /tmp/src/external/historical/nawk/dist/awkgram.c:2800:18
#4 0x51f5c2 in main /tmp/src/external/historical/nawk/dist/main.c:229:2
#5 0x7f80822ba2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x45e610 in __strdup (/tmp/src/external/historical/nawk/dist/awk+0x45e610)
#1 0x532a6d in tostring /tmp/src/external/historical/nawk/dist/tran.c:441:6
#2 0x5318fd in setsymtab /tmp/src/external/historical/nawk/dist/tran.c:241:30
#3 0x5320d4 in envinit /tmp/src/external/historical/nawk/dist/tran.c:141:7
#4 0x51f5bd in main /tmp/src/external/historical/nawk/dist/main.c:228:3
#5 0x7f80822ba2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x45e610 in __strdup (/tmp/src/external/historical/nawk/dist/awk+0x45e610)
#1 0x532a6d in tostring /tmp/src/external/historical/nawk/dist/tran.c:441:6
#2 0x5318fd in setsymtab /tmp/src/external/historical/nawk/dist/tran.c:241:30
#3 0x531dc1 in arginit /tmp/src/external/historical/nawk/dist/tran.c:123:7
#4 0x51f58e in main /tmp/src/external/historical/nawk/dist/main.c:226:2
#5 0x7f80822ba2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x45e610 in __strdup (/tmp/src/external/historical/nawk/dist/awk+0x45e610)
#1 0x532a6d in tostring /tmp/src/external/historical/nawk/dist/tran.c:441:6
#2 0x5318fd in setsymtab /tmp/src/external/historical/nawk/dist/tran.c:241:30
#3 0x5315b2 in syminit /tmp/src/external/historical/nawk/dist/tran.c:112:14
#4 0x51f528 in main /tmp/src/external/historical/nawk/dist/main.c:222:2
#5 0x7f80822ba2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
SUMMARY: AddressSanitizer: 6 byte(s) leaked in 4 allocation(s).
>How-To-Repeat:
build nawk on linux (add macros for __UNCONST and __dead to proto.h) with addresssanitizer (-g -O1 -fsanitize=address -fno-omit-frame-pointer) and then run ./awk '{print $40}' < README
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52516 CVS commit: src/external/historical/nawk/dist
Date: Fri, 1 Sep 2017 03:01:06 -0400
Module Name: src
Committed By: christos
Date: Fri Sep 1 07:01:06 UTC 2017
Modified Files:
src/external/historical/nawk/dist: lex.c
Log Message:
PR/52516: Guy Incognito: Fix memory leak; setsymtab already calls tostring()
for the buffer, don't do it twice.
XXX: pullup-8
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/historical/nawk/dist/lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 06 Dec 2017 05:08:18 +0000
State-Changed-Why:
pullup-8 #425
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52516 CVS commit: [netbsd-8] src/external/historical/nawk/dist
Date: Fri, 8 Dec 2017 05:56:05 +0000
Module Name: src
Committed By: msaitoh
Date: Fri Dec 8 05:56:05 UTC 2017
Modified Files:
src/external/historical/nawk/dist [netbsd-8]: lex.c
Log Message:
Pull up following revision(s) (requested by dholland in ticket #425):
external/historical/nawk/dist/lex.c: revision 1.3
PR/52516: Guy Incognito: Fix memory leak; setsymtab already calls tostring()
for the buffer, don't do it twice.
XXX: pullup-8
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.38.1 src/external/historical/nawk/dist/lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 08 Dec 2017 06:01:55 +0000
State-Changed-Why:
fixed and pulled up, thanks
>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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.