NetBSD Problem Report #53396

From martin@aprisoft.de  Mon Jun 25 06:57:47 2018
Return-Path: <martin@aprisoft.de>
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 2FE2E7A159
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 25 Jun 2018 06:57:47 +0000 (UTC)
Message-Id: <20180625065738.2B3EA5CC854@emmas.aprisoft.de>
Date: Mon, 25 Jun 2018 08:57:38 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: xfwm4 crashes
X-Send-Pr-Version: 3.95

>Number:         53396
>Category:       pkg
>Synopsis:       xfwm4 crashes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    youri
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 25 07:00:00 +0000 2018
>Closed-Date:    
>Last-Modified:  Tue Jun 26 06:57:12 +0000 2018
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.19
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 8.99.19 NetBSD 8.99.19 (WHOEVER) #230: Sat Jun 23 08:21:35 CEST 2018 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Propably when settings changed (or xfsettingsd crashed) I get a core from
xfwm4:

Core was generated by `xfwm4'.
Program terminated with signal SIGBUS, Bus error.
#0  0x00000000410058fc in sn_startup_sequence_get_last_active_time.localalias
    () from /usr/pkg/lib/libstartup-notification-1.so.0
[Current thread is 1 (process 1)]
(gdb) bt
#0  0x00000000410058fc in sn_startup_sequence_get_last_active_time.localalias
    () from /usr/pkg/lib/libstartup-notification-1.so.0
=> 0x410058fc <sn_startup_sequence_get_last_active_time.localalias.5+28>:      stx  %g1, [ %o2 ]
(gdb) info reg o2
o2             0xffffffffffffca04       -13820

That is: it is trying to store a 64bit value at an address not properly 
aligned.


>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53396: xfwm4 crashes
Date: Tue, 26 Jun 2018 08:48:13 +0200

 Obvious bug, sn_startup_sequence_get_last_active_time takes two long pointer
 arguments, but xfc4-wm passes pointers to may-be-different types.

 The patch below should fix it.

 Martin


 --- src/startup_notification.c.orig	2015-05-18 14:09:19.000000000 +0200
 +++ src/startup_notification.c	2018-06-26 08:44:51.580042779 +0200
 @@ -128,6 +128,7 @@ sn_collect_timed_out_foreach (void *elem
      SnStartupSequence *sequence;
      time_t tv_sec;
      suseconds_t tv_usec;
 +    long l_sec, l_usec;
      double elapsed;

      g_return_if_fail (data != NULL);
 @@ -135,7 +136,8 @@ sn_collect_timed_out_foreach (void *elem

      sequence = element;
      ctod = (CollectTimedOutData *) data;
 -    sn_startup_sequence_get_last_active_time (sequence, &tv_sec, &tv_usec);
 +    sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec);
 +    tv_sec = l_sec; tv_usec = l_sec;

      elapsed =
          ((((double) ctod->now.tv_sec - tv_sec) * G_USEC_PER_SEC +

Responsible-Changed-From-To: pkg-manager->youri
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Tue, 26 Jun 2018 06:57:12 +0000
Responsible-Changed-Why:
Over to maintainer


State-Changed-From-To: open->analyzed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 26 Jun 2018 06:57:12 +0000
State-Changed-Why:
Patch works for me, should be acceptable upstream


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.