Message27995
| Author |
tim.peters |
| Recipients |
| Date |
2006年04月08日.05:25:07 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=31435
I did a data breakpoint on the 8 bytes in the sock_timeout
member, and it never triggered: nothing stores anything
there to change 30.0 to 0.0.
Instead, socketmodule.c and _ssl.c have different views of
where the members of a PySocketSockObject live. WRT
socketmodule.c sock_settimeout's `s`, and _ssl.c
newPySSLObject's `Sock` (which are the same object in the
test case), the debugger agrees about the addresses at which
these members live:
&s->_ob_next 0x0096c3e8
&s->_ob_prev 0x0096c3ec
&s->ob_refcnt 0x0096c3f0
&s->ob_type 0x0096c3f4
&s->sock_fd 0x0096c3f8
&s->sock_family 0x0096c3fc
&s->sock_type 0x0096c400
&s->sock_proto 0x0096c404
&s->sock_addr 0x0096c408
&s->errorhandler 0x0096c488
But there's a radical disconnect about where it thinks
sock_timeout lives:
&s->sock_timeout 0x0096c490
&Sock->sock_timeout 0x0096c48c
Indeed,
printf("%d\n", sizeof(PySocketSockObject));
displays different results:
socketmodule.c: 176
_ssl.c: 172
I'm unclear about why. Doing
printf("%d\n", sizeof(sock_addr_t));
prints 128 in both modules, so there's not an obvious
difference there. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 14:39:00 | admin | link | issue1462352 messages |
| 2007年08月23日 14:39:00 | admin | create |
|