Skip to content

Fixed the type conversion for the addresses list at isAddrOKCallback callback#79

Open
MoonSer wants to merge 1 commit into
FastCGI-Archives:masterfrom
MoonSer:fix_windows_callback_args_converting
Open

Fixed the type conversion for the addresses list at isAddrOKCallback callback#79
MoonSer wants to merge 1 commit into
FastCGI-Archives:masterfrom
MoonSer:fix_windows_callback_args_converting

Conversation

@MoonSer

@MoonSer MoonSer commented Jun 2, 2026

Copy link
Copy Markdown

Hello!
By converting char* (8 bytes) to an unsigned long (4 bytes), part of the pointer is discarded. As a result, after reverse conversion on 64-bit Windows, we get SIGSEGV when dereferencing (or UB).
(function specified at WSAAccept )

So, using FCGI_WEB_SERVER_ADDRS env. variable - is DEAD for Windows x64.

Signed-off-by: moonser <zuev_8@mail.ru>
@MoonSer MoonSer force-pushed the fix_windows_callback_args_converting branch from c4d25d7 to 0d0139b Compare June 2, 2026 17:18
@MoonSer

MoonSer commented Jun 2, 2026

Copy link
Copy Markdown
Author

By the way, do someone know at least one reason why the Windows implementation ignores the host being used?
That is, you are calling FCGX_OpenSocket("localhost:9191", 10) - but as a result, all interfaces will be listened to under Windows, not just localhost?

I've prepared the edits. It seems to be working, but I doubt it. Maybe they're sturdy crutches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant