NetBSD Problem Report #52460

From www@NetBSD.org  Thu Aug  3 04:00:58 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 D75B07A182
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 Aug 2017 04:00:58 +0000 (UTC)
Message-Id: <20170803040057.D60AD7A1F5@mollari.NetBSD.org>
Date: Thu,  3 Aug 2017 04:00:57 +0000 (UTC)
From: nonakap@gmail.com
Reply-To: nonakap@gmail.com
To: gnats-bugs@NetBSD.org
Subject: devel/jq: strftime function causes core dump
X-Send-Pr-Version: www-1.0

>Number:         52460
>Category:       pkg
>Synopsis:       devel/jq: strftime function causes core dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 03 04:05:00 +0000 2017
>Last-Modified:  Thu Aug 03 13:55:01 +0000 2017
>Originator:     Kimihiro Nonaka
>Release:        HEAD (20170802)
>Organization:
>Environment:
NetBSD netbsd 7.1_STABLE NetBSD 7.1_STABLE (NBSERVER) #10: Wed Jul 26 09:55:06 JST 2017  nonaka@netbsd:/home/storage/snapshot/NetBSD/7-STABLE/obj.NetBSD-amd64/amd64/sys/arch/amd64/compile/NBSERVER amd64
>Description:
nonaka@netbsd$ echo 334 | jq 'strftime("%Y-%m-%dT%H:%M:%SZ")'
Memory fault (core dumped)
nonaka@netbsd$ gdb jq
GNU gdb (GDB) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from jq...(no debugging symbols found)...done.
(gdb) core jq.core
[New process 1]
Core was generated by `jq'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000004054a1 in tm2jv ()
(gdb) bt
#0  0x00000000004054a1 in tm2jv ()
#1  0x00000000004056b7 in f_gmtime ()
#2  0x0000000000405cc1 in f_strftime ()
#3  0x0000000000404684 in jq_next ()
#4  0x00000000004026da in process ()
#5  0x0000000000426436 in main ()
(gdb)
>How-To-Repeat:
echo 334 | jq 'strftime("%Y-%m-%dT%H:%M:%SZ")'
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jperkin
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Thu, 03 Aug 2017 12:25:43 +0000
Responsible-Changed-Why:
Over to maintainer.


From: SODA Noriyuki <soda@NetBSD.org>
To: gnats-bugs@NetBSD.org, 
    pkg-manager@netbsd.org,
    gnats-admin@netbsd.org,
    pkgsrc-bugs@netbsd.org
Cc: nonakap@gmail.com
Subject: Re: pkg/52460: devel/jq: strftime function causes core dump
Date: Thu, 3 Aug 2017 21:31:09 +0900

 I believe this problem is addressed in the following pull request:
 https://github.com/stedolan/jq/pull/1458

Responsible-Changed-From-To: jperkin->pkg-manager
Responsible-Changed-By: jperkin@NetBSD.org
Responsible-Changed-When: Thu, 03 Aug 2017 12:39:32 +0000
Responsible-Changed-Why:
Not sure why I put myself as MAINTAINER as I don't use this package, reset.


From: Benny Siegert <bsiegert@gmail.com>
To: SODA Noriyuki <soda@NetBSD.org>
Cc: gnats-bugs@NetBSD.org,
 pkg-manager@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org,
 nonakap@gmail.com
Subject: Re: pkg/52460: devel/jq: strftime function causes core dump
Date: Thu, 3 Aug 2017 14:53:27 +0200

 > Am 03.08.2017 um 14:31 schrieb SODA Noriyuki <soda@NetBSD.org>:
 > 
 > I believe this problem is addressed in the following pull request:
 > https://github.com/stedolan/jq/pull/1458

 So is the plan to just wait for a new upstream release?

From: SODA Noriyuki <soda@NetBSD.org>
To: Benny Siegert <bsiegert@gmail.com>
Cc: SODA Noriyuki <soda@NetBSD.org>,
    gnats-bugs@NetBSD.org,
    pkg-manager@netbsd.org,
    gnats-admin@netbsd.org,
    pkgsrc-bugs@netbsd.org,
    nonakap@gmail.com
Subject: Re: pkg/52460: devel/jq: strftime function causes core dump
Date: Thu, 3 Aug 2017 22:13:17 +0900

 >  So is the plan to just wait for a new upstream release?

 Yes.
 Or, if it takes too much time, applying part of the patches may be
 an option, perhaps.

 the following patch should fix the segmentation fault, for example.
 https://github.com/stedolan/jq/pull/1458/commits/df9a0963f8fa6fca773b059dce22c598152f3edb

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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