NetBSD Problem Report #55819
From tsutsui@ceres.dti.ne.jp Mon Nov 23 15:58:13 2020
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 A8DA61A921F
for <gnats-bugs@gnats.NetBSD.org>; Mon, 23 Nov 2020 15:58:13 +0000 (UTC)
Message-Id: <202011231558.0ANFw45G022635@ceres.dti.ne.jp>
Date: Tue, 24 Nov 2020 00:58:04 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: 2020Q3 print/ghostscript-agpl dumps core on NetBSD/earm 9.1
X-Send-Pr-Version: 3.95
>Number: 55819
>Category: pkg
>Synopsis: 2020Q3 print/ghostscript-agpl dumps core on NetBSD/earm 9.1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 23 16:00:01 +0000 2020
>Originator: Izumi Tsutsui
>Release: NetBSD 9.1
>Organization:
>Environment:
System: NetBSD hpt5325 9.1 NetBSD 9.1 (HPT5325) #2: Wed Nov 18 19:59:51 JST 2020 tsutsui@mirage:/s/netbsd-9/src/sys/arch/evbarm/compile/HPT5325 evbarm
Architecture: earm (earmv5)
Machine: evbarm
>Description:
ps2pdf (that invoces /usr/pkg/bin/gsc) from pkgsrc-2020Q3
pkgsrc/print/ghostscript-agpl on NetBSD/earm (earmv5) dumps core
(see 'How-To-Repeat' section for details).
gdb shows:
---
Core was generated by `gs'.
Program terminated with signal SIGBUS, Bus error.
#0 0xbab881e8 in packed_get (mem=0xb9f39000, packed=0xb9bce2b4,
pref=0xb9bce2b4) at ./psi/iutil.c:707
707 make_int(pref, (ps_int)value + packed_min_intval);
(gdb)
---
The 'make_int' macro is defined in ghostscript-9.53.1/psi/store.h.
http://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=psi/store.h;h=fd7dc793147eba310b4147b507c34908dd0d7198;hb=09763e4d082755436bb36bbef912193357058535#l157
---
#define make_tasv(pref,newtype,newattrs,newsize,valfield,newvalue)\
((pref)->value.valfield = (newvalue),\
r_set_type_attrs(pref, newtype, newattrs),\
r_set_size(pref, newsize))
#define make_tasv_new(pref,t,a,s,vf,v)\
make_tasv(pref,t,(a)|ialloc_new_mask,s,vf,v)
#define make_tasv_old(pcont,pref,t,a,s,vf,v,cname)\
(ref_save(pcont,pref,cname), make_tasv_new(pref,t,a,s,vf,v))
/* Type-specific constructor macros for scalar (non-composite) types */
#define make_bool(pref,bval)\
make_tv(pref, t_boolean, boolval, bval)
#define make_false(pref)\
make_bool(pref, 0)
#define make_true(pref)\
make_bool(pref, 1)
#define make_int(pref,ival)\
make_tv(pref, t_integer, intval, ival)
#define make_int_new(pref,ival)\
make_tv_new(pref, t_integer, intval, ival)
---
It smells caused by unaligned access, but needs to investigate
implementation details.
Note ghostscript-agpl-9.27nb3 from pkgsrc-2019Q3 also fails.
>How-To-Repeat:
# uname -mrsp
NetBSD 9.1 evbarm earm
# pkg_add -U https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/earm/9.0_2020Q3/All/ghostscript-agpl-9.53.1.tgz
pkg_add: Warning: package `ghostscript-agpl-9.53.1' was built for a platform:
pkg_add: NetBSD/earm 9.0 (pkg) vs. NetBSD/earm 9.1 (this host)
# echo hoge | ps2pdf -
Bus error (core dumped)
#
>Fix:
No idea.
---
Izumi Tsutsui
(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.