Skip to content

Commit 87fff15

Browse files
committed
Try to get to the bottom of what's going on with hoax.
1 parent 5b92348 commit 87fff15

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

hoax/executor/decode.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
(build-string (bits->value (mem-ref p))
3333
(lambda (j)
3434
(integer->char (mem-ref32 (+ p 8 (* 4 j)))))))]
35-
[else (error "invalid bits")]))
35+
[else (error "invalid bits" b)]))
3636

3737
(define (mem-ref i)
3838
(ptr-ref (cast i _int64 _pointer) _int64))

hoax/executor/host.rkt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
(define heap
2020
(malloc 10000 'raw))
2121

22+
(unless (zero? (remainder (cast heap _pointer _int64) 4))
23+
(error "heap alignment false!"))
24+
2225
(define (asm-interp/host asm)
2326
(parameterize
2427
([current-externs

hoax/test/define-tests.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
(check-equal? (run '(begin (integer->char 97)
6464
(integer->char 98)))
6565
#\b))
66-
66+
6767
(begin ;; Fraud
6868
(check-equal? (run '(let ((x 7)) x)) 7)
6969
(check-equal? (run '(let ((x 7)) 2)) 2)

0 commit comments

Comments
 (0)