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

[racketcs] udp-receive! causes invalid memory reference #2433

Closed
greghendershott opened this issue Dec 19, 2018 · 0 comments
Closed

[racketcs] udp-receive! causes invalid memory reference #2433

greghendershott opened this issue Dec 19, 2018 · 0 comments

Comments

@greghendershott
Copy link
Contributor

greghendershott commented Dec 19, 2018

On today's snapshot build for macOS.

/tmp/udp.rkt:

#lang racket/base
(require racket/udp
         racket/function)
(define port 50000)
(define u (udp-open-socket #f #f))
(udp-bind! u #f port #t)
(udp-send-to u "127.0.0.1" port #"Hello")
(define buffer (make-bytes #xffff))
(define-values (len host _port) (udp-receive! u buffer))
(displayln (list host _port (subbytes buffer 0 len)))
$ /Applications/Racket_v7.1.0.10-CS/bin/racket /tmp/udp.rkt
invalid memory reference.  Some debugging context lost
  context...:
   condition->exn
   dynamic-wind
   linklet.sls:893:4: call-with-module-prompt
   /Users/racket/build/plt/build/cs/racket/src/build/cs/compiled/expander.scm:46630:96: body of "/tmp/udp.rkt"
   /Users/racket/build/plt/build/cs/racket/src/build/cs/compiled/expander.scm:18993:13: for-loop
   /Users/racket/build/plt/build/cs/racket/src/build/cs/compiled/expander.scm:19125:5: run-module-instance!125
   /Users/racket/build/plt/build/cs/racket/src/build/cs/compiled/expander.scm:32811:5: perform-require!78
   main.sps:173:3: namespace-require+
   #%for-each
   main.sps:636:4: thunk_6

Expected result, displays:

(127.0.0.1 50000 Hello)
@mflatt mflatt closed this as completed in d14238a Dec 21, 2018
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

1 participant