bugKawa - Bugs: bug #37633, char-set-union with same char-sets

 
 

bug #37633: char-set-union with same char-sets

Submitted by:  None
Submitted on:  Fri 26 Oct 2012 12:04:24 AM UTC  
 
Category: Scheme librarySeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 23 Dec 2012 10:55:31 PM UTC, comment #1:

Thanks for the bug report and fix, and sorry I let it sit so long.
It's checked in now.

Per Bothner <bothner>
Project Administrator
Fri 26 Oct 2012 12:04:24 AM UTC, original submission:

char-set-union from the srfi-14 lib goes in an infinite loop when applying it to the same charsets. For example, this fails with a stack overflow:

(import (srfi :14)) (char-set-union char-set:ascii char-set:ascii)

it is fixed by defining %boundary-pairs-union as follows, with one additional and clause:

(define (%boundary-pairs-union (l1 ::list) (l2 ::list)) ::list
(display l1) (display " -- ")
(display l2) (newline)
(cond ((null? l1) l2)
((null? l2) l1)
((or (> (cdar l2) (cdar l1)) ; swap arguments if
(and (= (cdar l2) (cdar l1)) ; necessary to ensure
(< (caar l2) (cdar l1)) ; (cdar l1) is highest
(> (caar l2) (caar l1))))
(%boundary-pairs-union l2 l1))
(else
....

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 23 Dec 2012 10:55:31 PM UTCbothnerStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1