[Mono-bugs] [Bug 76447][Maj] Changed - gint32/long mixup in socket option setting

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Nov 2 14:11:23 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by kamenovl at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76447

--- shadow/76447	2005-11-02 10:31:50.000000000 -0500
+++ shadow/76447.tmp.21301	2005-11-02 14:11:23.000000000 -0500
@@ -76,6 +76,35 @@
 *FreeBSD* specific so it shouldnt break any other platform build.
 
 ------- Additional Comments From dick at ximian.com  2005-11-02 10:31 -------
 All I can see in that diff is an if block replaced by a switch, and
 some whitespace changes.  Is there an actual fix buried in there
 somewhere?
+
+------- Additional Comments From kamenovl at gmail.com  2005-11-02 14:11 -------
+it is, take a look at the debug print above.
+-- this bit --
+** Message: ioctlsocket: invalid command = 2147772030
+** Message: ioctlsocket: FIONBIO = 2147772030
+-- this bit --
+
+it wasnt going in this block:
+	if (command != FIONBIO &&
+	    command != FIONREAD &&
+	    command != SIOCATMARK)
+
+but cmd was EQUAL to FIONBIO.
+definitions of FIONBIO on BSD and Linux:
+
+some old 2.6.10 kernel (asm-x86_64):
+#define FIONBIO         0x5421
+
+freebsd 5.4 stable:
+FIONBIO resolves to
+((unsigned long)(0x80000000 | ((sizeof(int) & 0x1fff) << 16) |
+((('f')) << 8) | ((126))))
+
+FIONBIO and cmd are different types, cmd = (int)FIONBION doesnt imply
+that cmd == FIONBIO. 
+and i wasnt going to put ifdefs and casts around, hence the switch.
+
+hope that makes sense.


More information about the mono-bugs mailing list