From nobody@FreeBSD.org  Tue Aug 28 15:21:09 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id EE3D237B407
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Aug 2001 15:21:08 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f7SML8W42353;
	Tue, 28 Aug 2001 15:21:08 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200108282221.f7SML8W42353@freefall.freebsd.org>
Date: Tue, 28 Aug 2001 15:21:08 -0700 (PDT)
From: Chris Wilmes <cwilmes@creighton.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Segmentation fault in teachgammon
X-Send-Pr-Version: www-1.0

>Number:         30172
>Category:       misc
>Synopsis:       Segmentation fault in teachgammon
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 28 15:30:00 PDT 2001
>Closed-Date:    Mon Sep 3 07:19:47 PDT 2001
>Last-Modified:  Mon Sep 03 07:19:57 PDT 2001
>Originator:     Chris Wilmes
>Release:        4.3
>Organization:
Creighton University
>Environment:
FreeBSD leghorn.creighton.edu 4.3-STABLE
FreeBSD 4.3-STABLE #1: Wed Jul 25 12:50:45 CDT 2001     root@leghorn.creighton.edu:/usr/obj/usr/src/sys/MYKERNEL  i386
>Description:
Segmentation fault in teachgammon (the backgammon tutorial in /usr/games) when returning to main menu from some other menu.

Problem also occurs on a friend's machine, which is running FreeBSD-current.
>How-To-Repeat:
Run the following commands:
% teachgammon (starts the program)
<space>       (takes user to main menu after initial screen)
i             (takes user to Introduction)
?             (is supposed to return user to main menu, but instead causes segmentation fault)
>Fix:

>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: Chris Wilmes <cwilmes@creighton.edu>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/30172: Segmentation fault in teachgammon 
Date: Tue, 28 Aug 2001 22:24:54 -0700

 Chris Wilmes <cwilmes@creighton.edu> wrote:
 
 Please wrap lines at or less than 80 characters.  Thanks.
 
 > >Description:
 > Segmentation fault in teachgammon (the backgammon tutorial in /usr/games) when returning to main menu from some other menu.
 > 
 > Problem also occurs on a friend's machine, which is running FreeBSD-current.
 > >How-To-Repeat:
 > Run the following commands:
 > % teachgammon (starts the program)
 > <space>       (takes user to main menu after initial screen)
 > i             (takes user to Introduction)
 > ?             (is supposed to return user to main menu, but instead causes segmentation fault)
 
 Please try this patch: (apply in src/games/backgammon/teachgammon)
 
 Index: ttext2.c
 ===================================================================
 RCS file: /ref/cvsf/src/games/backgammon/teachgammon/ttext2.c,v
 retrieving revision 1.3
 diff -u -r1.3 ttext2.c
 --- ttext2.c	30 Nov 1999 03:48:30 -0000	1.3
 +++ ttext2.c	29 Aug 2001 05:23:04 -0000
 @@ -41,7 +41,8 @@
  
  #include "back.h"
  
 -char *prompt, *list, *opts;
 +extern const char *const list[];
 +char *prompt, *opts;
  
  const char	*const doubl[] = {
      "\nDoubling:",
 
Responsible-Changed-From-To: freebsd-bugs->dd 
Responsible-Changed-By: dd 
Responsible-Changed-When: Thu Aug 30 00:41:52 PDT 2001 
Responsible-Changed-Why:  
I have a fix for this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30172 
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Mon Sep 3 07:19:47 PDT 2001 
State-Changed-Why:  
Fixed in -current, will MFC after a while. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30172 
>Unformatted:
