NetBSD Problem Report #60257
From www@netbsd.org Wed May 13 01:56:10 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 775261A9239
for <gnats-bugs@gnats.NetBSD.org>; Wed, 13 May 2026 01:56:10 +0000 (UTC)
Message-Id: <20260513015609.92F101A923A@mollari.NetBSD.org>
Date: Wed, 13 May 2026 01:56:09 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: devel/py-numpy: ctype(3) abuse
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>
>Number: 60257
>Category: pkg
>Synopsis: devel/py-numpy: ctype(3) abuse
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 13 02:00:00 +0000 2026
>Originator: Taylor R Campbell
>Release: pkgsrc-current, math/py-numpy 2.4.4
>Organization:
The NumpyBSDumpty Array Subscription
>Environment:
>Description:
[254/461] Compiling C object numpy/_core/_rational_tests.so.p/src_umath__rational_tests.c.o
In file included from /usr/include/ctype.h:97,
from /home/riastradh/pkgsrc/current/work/math/py-numpy/work/.bu
ildlink/include/python3.11/unicodeobject.h:58, from /home/riastradh/pkgsrc/current/work/math/py-numpy/work/.buildlink/include/python3.11/Python.h:51,
from ../numpy/_core/src/umath/_rational_tests.c:3:
../numpy/_core/src/umath/_rational_tests.c: In function 'pyrational_new':
../numpy/_core/src/umath/_rational_tests.c:416:34: warning: array subscript has type 'char' [-Wchar-subscripts]
416 | if (!isspace(*p)) {
| ^
>How-To-Repeat:
build math/py-numpy
>Fix:
1. convert char to unsigned char first
2. check for other abuse in the vicinity
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.