Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2011 15:21:21 GMT
From:      Yasuhito FUTATSUKI <futatuki@bsdclub.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/162896: games/yamsweeper crashs by segmentation fault under amd64 environment
Message-ID:  <201111261521.pAQFLLwG001372@red.freebsd.org>
Resent-Message-ID: <201111261530.pAQFUBQx036558@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         162896
>Category:       ports
>Synopsis:       games/yamsweeper crashs by segmentation fault under amd64 environment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 26 15:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Yasuhito FUTATSUKI
>Release:        FreeBSD 9.0-RC2
>Organization:
>Environment:
FreeBSD leopardon-alpha.yf.bsdclub.org 9.0-RC2 FreeBSD 9.0-RC2 #1: Wed Nov 16 04:01:38 JST 2011     root@leopardon-alpha.yf.bsdclub.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
games/yamsweeper crashs with segmentation fault under amd64 arch environment.
This problem don't occur under i386 arch environment.
>How-To-Repeat:
$ cd /usr/ports/games/yamsweeper && sudo make install
$ rehash
$ yamsweeper

>Fix:
Here is a patch.

Patch attached with submission follows:

diff -ur /usr/ports/games/yamsweeper/files/patch-aa ./files/patch-aa
--- /usr/ports/games/yamsweeper/files/patch-aa	1996-09-22 01:56:46.000000000 +0900
+++ ./files/patch-aa	2011-11-26 23:38:33.000000000 +0900
@@ -1,20 +1,10 @@
-diff -arcN ../yamsweeper-1.9.org/main.c ./main.c
-*** ../yamsweeper-1.9.org/main.c	Thu Nov  3 09:20:41 1994
---- ./main.c	Sat Sep 21 09:50:53 1996
-***************
-*** 118,124 ****
-  #endif
-  {
-  #if LOG_USER
-!     char* user = getenv(appData.identifier);
-      time_t tt = time(NULL);
-      char* ct = ctime(&tt);
-      FILE* fp = fopen(LOGFILE, "a");
---- 118,124 ----
-  #endif
-  {
-  #if LOG_USER
-!     char* user = (char *)getenv(appData.identifier);
-      time_t tt = time(NULL);
-      char* ct = ctime(&tt);
-      FILE* fp = fopen(LOGFILE, "a");
+--- main.c.orig	1994-11-03 09:20:41.000000000 +0900
++++ main.c	2011-11-26 23:01:07.000000000 +0900
+@@ -23,6 +23,7 @@
+ #include <X11/cursorfont.h>
+ #include <stdio.h>
+ #include <signal.h>
++#include <stdlib.h>
+ #ifndef sun
+ #include <time.h>
+ #endif


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111261521.pAQFLLwG001372>