bug-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-serveez] SEGV in guile_error


From: Mike Gran
Subject: Re: [bug-serveez] SEGV in guile_error
Date: Tue, 26 Feb 2013 06:47:50 -0800 (PST)

> From: Thien-Thi Nguyen <address@hidden>

> 
> Here's something i cooked up:
> 
> Unfortunately, under Guile 1.8.7, it doesn't segfault, but instead shows
> "undefined:0:0" (w/o the change to use ‘SCM_OPINPORTP’).  Likewise, w/
> the patch applied.

I get the same result as you.  Mine is a slightly different case.
In yours, the port is #<undefined> instead of #<closed: file 0>, I think.

The original error was something like the code below.
Obviously, you'd need to send a UDP packet to 1069
to make the error happen.

 -----

(define (serv1-handle-request socket binary size)
  ;; Make sure the config file is closed
  (gc)
  ;; Doubly-define a port to cause a serveez guile error
  (define-port! 'serv2-port `((proto . udp)
                  (port . 1070)
                  (ipaddr . *)))
  (define-port! 'serv2-port `((proto . udp)
                  (port . 1071)
                  (ipaddr . *)))
  0)

(define-servertype!
  '((prefix . "serv1")
    (description . "server error test")
    (handle-request . serv1-handle-request)
    (configuration . ())))

(define-port! 'serv1-port `((proto . udp)
               (port . 1069)
               (ipaddr . *)))

(define-server! 'serv1-server)

(bind-server! 'serv1-port 'serv1-server)

-----

Thanks,

Mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]