NetBSD Problem Report #55284

From  Fri May 22 13:59:47 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 56F7E1A9227
	for <>; Fri, 22 May 2020 13:59:47 +0000 (UTC)
Message-Id: <>
Date: Fri, 22 May 2020 13:59:46 +0000 (UTC)
Subject: 'wmweather' broken on architecture where sizeof(long) < sizeof(time_t)
X-Send-Pr-Version: www-1.0

>Number:         55284
>Category:       pkg
>Synopsis:       'wmweather' broken on architecture where sizeof(long) < sizeof(time_t)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 22 14:00:00 +0000 2020
>Originator:     Romain Dolbeau
>Release:        pkgsrc 2020Q1
NetBSD 9.0 NetBSD 9.0 (GENERIC.MP) #0: Fri Feb 14 00:06:28 UTC 2020 sparc
'wmweather' is broken on architecture where sizeof(long) < sizeof(time_t), as it passes a pointer to a 'long' (4 bytes on NetBSD/sparc) to time(), which takes a pointer to a time_t (8 bytes).

On NetBSD/sparc said long is not 8-bytes aligned, leading to a 'Bus error' due to a misaligned load (rather than a stack corruption).
start wmweather on NetBSD/sparc -> Bus error.
I have a patch that I will submit in a follow-up e-mail, which introduce an extra time_t variable to avoid the issue.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.