View Issue Details

IDProjectCategoryView StatusLast Update
0004485unrealircdpublic2015-12-09 12:04
ReporterRobben Assigned Tosyzop  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformwindowsOSwindowsOS Versionwin7
Product Version4.0.0-rc4 
Fixed in Version4.0.0-rc5 
Summary0004485: A crash occers when the system uses the "select I/O" model on the windows platform.
DescriptionThe system uses the "select I/O" model on the windows platform.
When a new connection coming, the program crashes on line 229 in file "s_dispatch.c"(version: 4.0.0-rc4), it seems that "work_except_fds" is not initialized.
TagsNo tags attached.
3rd party modules

Activities

syzop

2015-12-09 10:52

administrator   ~0018896

Strange code. Line 229 is:
        if (FD_ISSET(fd, &work_except_fds))

But work_except_fds isn't set anywhere, so it's useless (and uninitialized, as the bug report says).

I always thought/assumed that on windows it was necessary to fill and check exception fd's. Is that no longer the case? Then the whole work_except_fds stuff (and except_fds) can simply be removed.
If it IS necessary... then we have a problem.

syzop

2015-12-09 10:55

administrator   ~0018897

From MSDN:

exceptfds:

* If processing a connect call (nonblocking), connection attempt failed.
* OOB data is available for reading (only if SO_OOBINLINE is disabled).

syzop

2015-12-09 11:59

administrator   ~0018898

Thanks for the report. Should be fixed now.

[unreal40 46581f2] Windows: Fix possible crash on connect. Add error message on failed server connect (not perfect yet). Reported by Robben (0004485).
https://github.com/unrealircd/unrealircd/commit/46581f2bfb6b306800538abc72ffed12b256dcf1

Issue History

Date Modified Username Field Change
2015-12-09 10:37 Robben New Issue
2015-12-09 10:52 syzop Note Added: 0018896
2015-12-09 10:55 syzop Note Added: 0018897
2015-12-09 11:59 syzop Note Added: 0018898
2015-12-09 11:59 syzop Status new => resolved
2015-12-09 11:59 syzop Resolution open => fixed
2015-12-09 11:59 syzop Assigned To => syzop
2015-12-09 12:04 syzop Fixed in Version => 4.0.0-rc5