(bitwise-arithmetic-shift-left <bignum> 32) in the 32-bit build returns junk

Bug #408338 reported by Gwen Weinholt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
High
Abdulaziz Ghuloum

Bug Description

(bitwise-arithmetic-shift-left <bignum> 32) in the 32-bit build returns junk mixed in with the original number:

Ikarus Scheme version 0.0.4-rc1+ (revision 1843, build 2009-08-03)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

> (number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"B79BFF7CC0E79300"
> (number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"17CC0E79300"
> (number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"B701EE7CC0E79300"
> (number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"367CC0E79300"
> (number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"2C7CC0E79300"
> (number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"7CC0E79300"
>
etc etc

This is the bug you found when you ran my DES test suite. :)

Related branches

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Bizarre! It was shifting by 8 bits instead of 32, and that bug exists in shifts of multiples of wordsize on both 32 and 64-bit. I wonder how this slipped through all along.

Changed in ikarus:
assignee: nobody → Abdulaziz Ghuloum (aghuloum)
importance: Undecided → High
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.