Opened 13 years ago
Closed 12 years ago
#233 closed defect (fixed)
getsockname() and getpeername() fail when using high memory
Reported by: | rudi | Owned by: | bird |
---|---|---|---|
Priority: | normal | Milestone: | libc-0.6.5 |
Component: | libc | Version: | 0.6.4 |
Severity: | normal | Keywords: | |
Cc: |
Description
The functions getsockname() and getpeername() will fail, if the variable containing the size of "struct sockaddr" is located in high memory.
It is suggested not to pass the address of that variable directly to the IP stack but use an intermediate local instead.
Change History (12)
comment:1 Changed 13 years ago by
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
in my tests with samba and libc064 connect() still does not work when built with -Zhigh-mem
comment:5 Changed 12 years ago by
Milestone: | libc-0.6.4 → libc-0.6.5 |
---|
comment:6 Changed 12 years ago by
as a addition socketpair() doesn't work also when the fd is in high-mem
comment:7 Changed 12 years ago by
see http://svn.netlabs.org/qt4/ticket/179 for a little testcase. sockname_fail.zip
comment:8 Changed 12 years ago by
getpeername() always returns -1 now.
http://svn.netlabs.org/libc/changeset?reponame=&new=3674%40trunk%2Flibc%2Fsrc%2Flibsocket%2Fgetpeername.c&old=2446%40trunk%2Flibc%2Fsrc%2Flibsocket%2Fgetpeername.c
the LIBCLOG_RETURN_INT(rc); on line 48 was eliminated by accident i guess
comment:9 Changed 12 years ago by
No, I guess it was eliminated on purpose, but the last statement should be
LIBCLOG_RETURN_INT(rc);
. Anyway, for the time being, the hot fix of libc_dll.lib is here ftp://ftp.netlabs.org/pub/odin/test/libc_dll_233_regression_fixed.zip.
comment:10 Changed 12 years ago by
comment:12 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Version: | → 0.6.4 |
(In [3674]) libsocket: Made it possible to pass sockaddr parameters in high memory to accept, getsockname, bind, connect and getpeername. (untested) References #233.