bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13084: boyer_moore crashes with certain characters in the case table


From: Juri Linkov
Subject: bug#13084: boyer_moore crashes with certain characters in the case table
Date: Wed, 05 Dec 2012 02:34:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

The minimal reproducible recipe for crashes in boyer_moore noticed in bug#13041:

1. emacs -Q

2. Eval in *scratch*:

(let ((table (standard-case-table)) canon)
  (setq canon (copy-sequence table))
  (aset canon #xff59 ?y)
  (set-char-table-extra-slot table 1 canon)
  (set-char-table-extra-slot table 2 nil)
  (set-standard-case-table table))

3. Start an activity that includes a search, e.g. `C-x 8 RET TAB'

The crash in boyer_moore is caused by fullwidth characters like #xff59
whose Unicode properties are:

  name: FULLWIDTH LATIN SMALL LETTER Y
  decomposition: (wide 121) (wide 'y')

However, the crash doesn't occur when the same fullwidth characters are
set to their downcase counterparts in lisp/international/characters.el:

  ;; Fullwidth Latin
  (setq c #xff21)
  (while (<= c #xff3a)
    (set-case-syntax-pair c (+ c #x20) tbl)
    (modify-category-entry c ?l)
    (modify-category-entry (+ c #x20) ?l)
    (setq c (1+ c)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]