bugDotGNU Portable.NET - Bugs: bug #10500, System.Net.Socket Solaris 9...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10500: System.Net.Socket Solaris 9 SocketType.Stream Incorrect

Submitter:  None
Submitted:  Sun 26 Sep 2004 06:59:44 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  t3rmin4t0r Open/Closed:  Closed

Discussion

Tue 28 Sep 2004 09:22:41 AM UTC, comment #3: 

Fixed by patch #3392.

Gopal.V <t3rmin4t0r>
Group administrator
Sun 26 Sep 2004 03:49:44 PM UTC, comment #2: 

I would have liked to submit a patch but I do not know how to create one.  I just modified the support/socket.c with an ugly hack that seems to work.  I am not sure if this is the most effecitent cross platform way to fix this but I tried my best and I can at least use pnet.

Can someone please point me to a page on out to create a patch.

The patch was made from cvs using:
# diff -ur pnet pnet-hack > bug10500_socket.patch

Adam

Adam J. Tybor <abombss>
Sun 26 Sep 2004 01:43:31 PM UTC, comment #1: 

Solaris seems to use the following for socket values

#define SOCK_STREAM     2               /* stream socket */
#define SOCK_DGRAM      1               /* datagram socket */
#define SOCK_RAW        4               /* raw-protocol interface */

I'll be fixing this soon.

Gopal.V <t3rmin4t0r>
Group administrator
Sun 26 Sep 2004 06:59:44 AM UTC, original submission:  

Description:
Running pnet on sparc Solaris 9 sockets are constructed with System.Net.Sockets.SocketType.Stream are getting built as SOCK_DGRAM.

C# Code:
Socket listenSocket =
             new Socket(AddressFamily.InterNetwork,
                 SocketType.Stream,
                 ProtocolType.Tcp);

Error Message:
# truss -fl -t so_socket -x so_socket ilrun SocketTest.exe
17071/1:            Incurred fault #6, FLTBOUNDS  %pc = 0x000D540C
17071/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0xFFC00000
17071/1:            Received signal #11, SIGSEGV [caught]
17071/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0xFFC00000
17071/1:        so_socket(PF_INET, SOCK_DGRAM, IPPROTO_TCP,
0x00000000, 1) Err#98 EPROTOTYPE
17071/1:             0x00000000: ""
Uncaught exception: System.Net.Sockets.SocketException: Protocol not supported
      at System.Net.Sockets.Socket..ctor(AddressFamily, SocketType,
ProtocolType) in ./Net/Sockets/Socket.cs:116
      at AdamTest.SocketTest.Main(String[])

Reproduce:
Build pnet on sparc solaris 9.
compile and run the attached sample program.

Anonymous

 

Attached Files

Attached Files
file #1805:  bug10500_socket.patch added by abombss (9.9KiB - application/octet-stream - Patch for 10500 )
file #1803:  SocketTest.cs added by None (763B - application/octet-stream - Small Test App for reproducing the bug)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

History

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-09-28 t3rmin4t0r StatusNone Fixed
    Open/ClosedOpen Closed
2004-09-26 abombss Attached File- Added bug10500_socket.patch, #1710
2004-09-26 t3rmin4t0r Assigned toNone t3rmin4t0r
2004-09-26 None Attached File- Added SocketTest.cs, #1708

Back to the top

Powered by Savane 3.16-a7ba.
Corresponding source code