Ticket #1955 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

socket broken on Windows

Reported by: fperrad Owned by: nwellnhof
Priority: normal Milestone:
Component: core Version: 2.11.0
Severity: high Keywords:
Cc: Language:
Patch status: Platform: win32

Description

the following code fails on Windows

.include 'socket.pasm'

.sub 'main' :main
    .local pmc sock, addr
    sock = new 'Socket'
    sock.'socket'(.PIO_PF_INET, .PIO_SOCK_STREAM, .PIO_PROTO_TCP)
    addr = sock.'sockaddr'('www.parrot.org', 80)
    sock.'connect'(addr)
    say "ok"
.end

with the output:

gethostbyname failure [www.parrot.org]
ok

Change History

Changed 11 years ago by nwellnhof

  • owner set to nwellnhof
  • status changed from new to assigned
  • component changed from none to core

I just realized that, too. Has this ever worked?

It seems that we should use AF_INET instead of PF_INET on Win32. I'm going to address this in the nwellnhof/platform_src branch.

Changed 11 years ago by fperrad

It is a regression.

git bisect good
fb486758f15667a782b89fc06039c40d52e50ac0 is the first bad commit
commit fb486758f15667a782b89fc06039c40d52e50ac0
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Date:   Sat Jan 8 01:13:20 2011 +0100

    [io] Unify stdhandle init code

Changed 11 years ago by nwellnhof

2511592 should hopefully fix this, but I couldn't test it.

Changed 11 years ago by whiteknight

I just tested this program on 64bit Windows 7, and it works fine. I'm comfortable closing this, but we might want another data point to confirm (fperrad?).

Changed 11 years ago by fperrad

  • status changed from assigned to closed
  • resolution set to fixed

fixed with RELEASE_2_11_0-1111-g2511592. see  http://smolder.parrot.org/app/projects/report_details/2684

Note: See TracTickets for help on using tickets.