Ticket #194 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Assertion failure when setting up too large board in gmp mode.

Reported by: gunnar Owned by: gnugo
Priority: normal Milestone: 3.7.12
Component: source Version:
Severity: blocker Keywords:
Cc: patch: yes

Description

If GNU Go is started in gmp mode with a boardsize larger than MAX_BOARD, it fails less than gracefully with an assertion failure:

***assertion failure:
board.c:425 - board_size > 0 && board_size <= 19 near PASS***


   A B C D E F G H J K L M N O P Q R S T U V
21 . . . . . . . . . . . . . . . . . . . O . 21
20 . . . . . . . . . . . . . . . . . . . O . 20
19 . . . . . . . . . . . . . . . . . . . O . 19
18 . . . + . . . . . . + . . . . . . + . O . 18
17 . . . . . . . . . . . . . . . . . . . O . 17
16 . . . . . . . . . . . . . . . . . . . O . 16
15 . . . . . . . . . . . . . . . . . . . O . 15
14 . . . . . . . . . . . . . . . . . . . O . 14
13 . . . . . . . . . . . . . . . . . . . O . 13     WHITE (O) has captured 0 stones
12 . . . . . . . . . . . . . . . . . . . O . 12     BLACK (X) has captured 0 stones
11 . . . + . . . . . . + . . . . . . + . O . 11
10 . . . . . . . . . . . . . . . . . . . O . 10
 9 . . . . . . . . . . . . . . . . . . . O . 9
 8 . . . . . . . . . . . . . . . . . . . O . 8
 7 . . . . . . . . . . . . . . . . . . . O . 7
 6 . . . . . . . . . . . . . . . . . . . O . 6
 5 . . . . . . . . . . . . . . . . . . . O . 5
 4 . . . + . . . . . . + . . . . . . + . O . 4
 3 . . . . . . . . . . . . . . . . . . . O O 3
 2 O O O O O O O O O O O O O O O O O O O O . 2
 1 . . . . . . . . . . . . . . . . . . . . . 1
   A B C D E F G H J K L M N O P Q R S T U V
(;GM[1]FF[4]SZ[21]KM[5.5]HA[0]GN[GNU Go 3.7.11 stepped on a bug]
)
gnugo 3.7.11 (seed 1195242873): You stepped on a bug.

Cf. the Debian bug report at  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=449311

Attachments

gunnar_7_12.2.diff Download (3.8 KB) - added by gunnar 4 years ago.
Fix for the crash and centralized boardsize checks.

Regression Results

Attachment Rev. PASS FAIL Nodes Status
gunnar_7_12.2.diff Download never tested

Change History

Changed 4 years ago by gunnar

Fix for the crash and centralized boardsize checks.

comment:1 Changed 4 years ago by gunnar

  • patch set

The attached patch fixes the problem by first centralizing all boardsize checks into a new function check_boardsize(), then calling this function from play_gmp.c.

comment:2 Changed 4 years ago by gunnar

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.