REBOL3 tracker
  0.9.12 beta
Ticket #0001612 User: anonymous

Project:



rss
TypeBug Statusbuilt Date16-May-2010 15:26
Versionalpha 99 CategoryNative Submitted byPeterWood
PlatformMac OSX Severitymajor Prioritynormal

Summary Union of two charsets randomly returns the not of the expected bitset
Description When evaluating union with two charsets, I have found that the not of the expected bitset is is returned on some occasions. The bug appears to occur randomly.
Example code
From a console session:

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! [not bits #{00000000000000000000000060}]

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! #{00000000000000000000000060}

>> a: union charset ["a"] charset ["b"] 
== make bitset! [not bits #{00000000000000000000000060}]


Assigned ton/a Fixed inalpha 108 Last Update27-Sep-2010 17:16


Comments
(0002370)
PeterWood
16-May-2010 15:59

I ran a quick test under Windows which didn't reproduce the bug.
(0002431)
meijeru
4-Jul-2010 19:21

Since the "not" property is stored in a separate word, this looks like a case of that word being overwritten sometimes.
(0002513)
Carl
21-Sep-2010 20:55

Peter: an excellent catch! Well done.
(0002545)
PeterWood
27-Sep-2010 17:16

It's one of the benefits of having a unit test suite that you can easily run. I was trying to convert a script from R2 to R3 and noticed that individual tests failed randomly. A little debugging found the problem.

Date User Field Action Change
27-Sep-2010 17:16 PeterWood Comment : 0002545 Added -
21-Sep-2010 20:55 carl Fixedin Modified => alpha 108
21-Sep-2010 20:55 carl Status Modified reviewed => built
21-Sep-2010 20:55 carl Comment : 0002513 Added -
4-Jul-2010 19:21 meijeru Comment : 0002431 Added -
17-May-2010 23:17 carl Code Modified -
17-May-2010 23:17 carl Status Modified submitted => reviewed
16-May-2010 15:59 PeterWood Comment : 0002370 Added -
16-May-2010 15:26 PeterWood Ticket Added -