Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000472OCamlOCaml generalpublic2001-08-06 16:452001-08-08 17:20
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000472: Socket bug
DescriptionFull_Name: Ohad Rodeh
Version: 3.02
OS: WIN2000
Submission from: sungold1.il.ibm.com (192.116.181.41)


The following program fails:

open Printf
open Unix

let _ =
    let local_addr = ADDR_INET (inet_addr_any, 0) in
    let sock = socket PF_INET SOCK_DGRAM 0 in
    setsockopt sock SO_REUSEADDR true;
    ()


Furthermore, I think there is a bug in win32unix/sockopt.c.
The socket conversion should be performed using:
    (SOCKET)Handle_val(v)
not:
 Inv_val

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000637)
administrator (administrator)
2001-08-08 17:01

> The following program fails:
>
> let _ =
> let local_addr = ADDR_INET (inet_addr_any, 0) in
> let sock = socket PF_INET SOCK_DGRAM 0 in
> setsockopt sock SO_REUSEADDR true;
> ()
> Furthermore, I think there is a bug in win32unix/sockopt.c.
> The socket conversion should be performed using:
> (SOCKET)Handle_val(v)
> not:
> Int_val

Yes, that's the cause of the failure. Untested cut-and-paste from the
modified Unix sources strikes again. (Blush.) This is fixed in the
working sources, but still rather unfortunate. Thanks for the quick
bug report.

Best regards,

- Xavier Leroy

(0000638)
administrator (administrator)
2001-08-08 17:20

Fixed 2001-08-08 by XL.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker