pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/55819: 2020Q3 print/ghostscript-agpl dumps core on NetBSD/earm 9.1



>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



Home | Main Index | Thread Index | Old Index