Opened 14 years ago
Closed 13 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 by , 14 years ago
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
in my tests with samba and libc064 connect() still does not work when built with -Zhigh-mem
comment:5 by , 13 years ago
Milestone: | libc-0.6.4 → libc-0.6.5 |
---|
comment:7 by , 13 years ago
see http://svn.netlabs.org/qt4/ticket/179 for a little testcase. sockname_fail.zip
comment:8 by , 13 years ago
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 by , 13 years ago
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 by , 13 years ago
comment:12 by , 13 years ago
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.