hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

bytevector-u64-ref incorrectly insists on aligned indices #208

Closed hyln9 closed 10 years ago

hyln9 commented 10 years ago

Yet another in my classic series of bytevector-related bug reports. :)

Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1820, build 2009-06-30) Copyright (c) 2006-2009 Abdulaziz Ghuloum

(bytevector-u64-ref (make-bytevector 9 0) 1 (endianness little)) Unhandled exception Condition components:

  1. &assertion
  2. &who: bytevector-u64-native-ref
  3. &message: "invalid index"
  4. &irritants: (1)

Obviously the native-ref procedure is right to demand alignment, but the byte-swapping procedure shouldn't.

Launchpad Details: #LP394035 Göran Weinholt - 2009-06-30 17:56:40 -0400

hyln9 commented 10 years ago

Fixed in 1840. Sorry for the delay.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-08-02 08:14:02 -0400

hyln9 commented 10 years ago

I'm not sure if this happened before or not, but the -set! procedure also demands alignment (with the wrong &who, no less):

Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1840, build 2009-08-02) Copyright (c) 2006-2009 Abdulaziz Ghuloum

(bytevector-u64-set! (make-bytevector 9 0) 1 0 (endianness little)) Unhandled exception Condition components:

  1. &assertion
  2. &who: bytevector-u64-ref
  3. &message: "invalid index"
  4. &irritants: (1)

Launchpad Details: #LPC Göran Weinholt - 2009-08-02 12:38:34 -0400

hyln9 commented 10 years ago

bytevector-s64-set! has the same problem:

Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1840, build 2009-08-02) Copyright (c) 2006-2009 Abdulaziz Ghuloum

(bytevector-s64-set! (make-bytevector 9 0) 1 0 (endianness little)) Unhandled exception Condition components:

  1. &assertion
  2. &who: bytevector-s64-ref
  3. &message: "invalid index"
  4. &irritants: (1)

I'm improving on my (weinholt struct pack) library and its test suite is finding these bugs...

Launchpad Details: #LPC Göran Weinholt - 2009-08-02 13:03:14 -0400

hyln9 commented 10 years ago

Fixed in 1841. Sorry about these endless bugs. I don't use these procedures much, and it's hard for me to just sit down and write test cases for them when there's so much else to do.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-08-02 14:27:21 -0400

hyln9 commented 10 years ago

Abdulaziz Ghuloum

Fixed in 1841. Sorry about these endless bugs. I don't use these procedures much, and it's hard for me to just sit down and write test cases for them when there's so much else to do.

That's ok, you fix them so fast that I don't have time to be bothered. :)

If you are interested in the test suite I've been working on it's tests/pack.sps in the repo lp:~weinholt/scheme-libraries/industria. Just wait for Launchpad to mirror the repo up to revision 99.

All the tests work in Ikarus revision 1842. It's supposed to test (weinholt struct pack), not the host Scheme, but it works for both. :)

Regards,

Göran Weinholt

Launchpad Details: #LPC Göran Weinholt - 2009-08-02 15:51:18 -0400

hyln9 commented 10 years ago

On Aug 2, 2009, at 10:51 PM, Göran Weinholt wrote:

If you are interested in the test suite I've been working on it's tests/pack.sps in the repo lp:~weinholt/scheme-libraries/industria. Just wait for Launchpad to mirror the repo up to revision 99.

All the tests work in Ikarus revision 1842. It's supposed to test (weinholt struct pack), not the host Scheme, but it works for both. :)

Hmmm. tests/des.sps does not run:

Unhandled exception: Condition components:

  1. &error
  2. &who: test-des
  3. &message: "Ron Rivest's test failed"
  4. &irritants: ()

Did I break something?

Aziz,,,

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-08-03 03:12:16 -0400

hyln9 commented 10 years ago

Abdulaziz Ghuloum

On Aug 2, 2009, at 10:51 PM, Göran Weinholt wrote:

If you are interested in the test suite I've been working on it's tests/pack.sps in the repo lp:~weinholt/scheme-libraries/industria. Just wait for Launchpad to mirror the repo up to revision 99.

All the tests work in Ikarus revision 1842. It's supposed to test (weinholt struct pack), not the host Scheme, but it works for both. :)

Hmmm. tests/des.sps does not run:

Unhandled exception: Condition components:

  1. &error
  2. &who: test-des
  3. &message: "Ron Rivest's test failed"
  4. &irritants: ()

Did I break something?

I'm not sure how recent this is, because the test works on the 64-bit build, which is what I normally use. I'll try to track down the cause.

Regards,

Göran Weinholt

Launchpad Details: #LPC Göran Weinholt - 2009-08-03 06:38:57 -0400