Skip to content

Commit

Permalink
Merge pull request #617 from jpellegrini/address
Browse files Browse the repository at this point in the history
Extensive check for crashes in `#p`
  • Loading branch information
egallesio authored Dec 6, 2023
2 parents bb9f2e5 + c5d4075 commit 4320397
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test-misc.stk
Original file line number Diff line number Diff line change
@@ -613,5 +613,11 @@ b|)
(map (lambda (thing) (address-ref (address-of thing)))
mylist)))

(test "#p shouldn't crash"
#void ;; return value from dotimes
(dotimes (i (expt 2 12)) ;; 12 so as to not slow down tests on older systems
(with-handler (lambda (a) -1)
(eval-from-string (format "#p~a" i )))))

;;------------------------------------------------------------------
(test-section-end)

0 comments on commit 4320397

Please sign in to comment.