Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket-to-bytes tests fail on 32-bit machines #41

Open
chwarr opened this issue Feb 24, 2016 · 1 comment
Open

websocket-to-bytes tests fail on 32-bit machines #41

chwarr opened this issue Feb 24, 2016 · 1 comment

Comments

@chwarr
Copy link
Contributor

chwarr commented Feb 24, 2016

The fourth test for websocket-to-bytes tests is failing on my 32-bit machine. If I had to guess, commit d29b171 looks like it introduced the failure. lsh doesn't like it when you give it a float.

Here's the backtrace I get when evaluating (websocket-to-bytes 536870912 8). Notice that I did not turn 536870912 into a float, but the reader did that for me, like what is happening in the test.

Debugger entered--Lisp error: (wrong-type-argument integerp 536870912.0)
  lsh(536870912.0 -32)
  (let ((hi-32bits (lsh val -32)) (low-32bits (if (= 0 (expt 2 32)) val (logand 4294967295.0 val)))) (if (or (> hi-32bits 0) (> (lsh low-32bits -29) 0)) (progn (signal (quote websocket-frame-too-large) val))) (bindat-pack (quote ((:val vec 2 u32))) (list (cons (quote :val) (vector hi-32bits low-32bits)))))
  (progn (let ((hi-32bits (lsh val -32)) (low-32bits (if (= 0 (expt 2 32)) val (logand 4294967295.0 val)))) (if (or (> hi-32bits 0) (> (lsh low-32bits -29) 0)) (progn (signal (quote websocket-frame-too-large) val))) (bindat-pack (quote ((:val vec 2 u32))) (list (cons (quote :val) (vector hi-32bits low-32bits))))))
  (if (= nbytes 8) (progn (let ((hi-32bits (lsh val -32)) (low-32bits (if (= 0 (expt 2 32)) val (logand 4294967295.0 val)))) (if (or (> hi-32bits 0) (> (lsh low-32bits -29) 0)) (progn (signal (quote websocket-frame-too-large) val))) (bindat-pack (quote ((:val vec 2 u32))) (list (cons (quote :val) (vector hi-32bits low-32bits)))))) (bindat-pack (list (list (quote :val) (cond ((= nbytes 1) (quote u8)) ((= nbytes 2) (quote u16)) ((= nbytes 4) (quote u32)) (t (error "websocket-to-bytes: Unknown NBYTES: %s" nbytes))))) (list (cons (quote :val) val))))
  websocket-to-bytes(536870912.0 8)
  eval((websocket-to-bytes 536870912.0 8) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Relevant emacs info

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'
@chwarr chwarr changed the title websocket-to-bytes tests fail on 32-bit machines websocket-to-bytes tests fail on 32-bit machines Feb 24, 2016
@ahyatt
Copy link
Owner

ahyatt commented Feb 27, 2016

I think someone with a 32 bit machine will have to fix this one...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants