[ オリジナルレポート ]

BugID: #05271

カテゴリ 重要度 ステータス 解決状況 登録日時 最終更新
システムコア認証済み未処理2013-08-26 02:282013-08-26 10:21
 
テスターmizapf担当者 ソース
バージョン0.149u1発生バージョン修正バージョン
修正コミットプルリク
フラグ
セット All systems using sdlsocket
セット詳細
 
概 要sdlsocketの接続失敗時のリアクションが不正。
詳 細If the emulator cannot connect to the socket that has been specified to sdlsocket, it tried to create a socket on this address, which actually fails (and the emulator silently stops, without error message).
再現手順 
追加情報It seems as if the sdlsocket is treated the same way as any other corefile, which means that when it cannot be opened, the core tries to create it. This becomes obvious when inserting printf into sdl_open_socket: On the next attempt to connect, the flag OPEN_FLAG_CREATE is set. The emulation silently returns, maybe as a consequence of a runtime error (segfault not reported).

This is obviously not a good option for socket handling. A server socket is not a replacement for a client socket.

Concerning possible ways to solve this issue: In Java, socket streams and file streams are related (both inheriting from InputStream and OutputStream), but File and Socket are two unrelated classes. It may be reasonable to handle files and sockets separately. Another way could be to parametrize the behavior of corefile; hence it will have a file mode and a socket mode.
 
添付ファイル