[BUG] DSA failure in LargePositiveInteger in #new: <primitive: 71>

Bob Arning arning at charm.net
Tue May 30 17:44:16 UTC 2000


On Tue, 30 May 2000 11:54:10 -0400 (EDT) Bob Arning <arning at charm.net> wrote:
>Here is at least part of the answer. Inspect the following:
>
>zz _ LargePositiveInteger new: 1.
>zz digitAt: 1 put: 1.
>a _ zz = 1. 
>b _ zz printString. 
>c _ zz = 1. 
>{a. b. c}
>
>As far back as Squeak 2.5, I get (true '1' false ).

Well, a slight correction - with the very latest Mac 2.8 VM (Squeak VM 2.8beta) and LargeIntegers it produces:

	(false '1' false )

With the previous VM (Squeak VM 2.8-NOT) it returns (as it does in 2.7 and 2.5)
	
	(true '1' false )

So the (or at least, one) difference is how #= is handled for "short" LargeIntegers with and without the plugin. Given this difference (plus who knows how many other places) and the class comment of LargePositiveInteger pointed out by Stephan, perhaps we should prohibit the creation of invalid LargeIntegers. I tried this :

LargePositiveInteger class>>new: digits

	digits < 4 ifTrue: [self halt].
	^super new: digits

and this trapped the DSA code much earlier. Looks like it will take some work there to be fully compliant with the new LargeIntegers.

Cheers,
Bob





More information about the Squeak-dev mailing list