| Summary: | SDL_CreateWindowFrom can lead to stack overflow | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jordan Milne <sdlbugs> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | icculus, sdlbugs |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| See Also: | http://bugzilla.libsdl.org/show_bug.cgi?id=1636 | ||
| Attachments: |
Repro code for the issue
compressed wmmsg.txt with event logs |
||
Created attachment 1022 [details]
compressed wmmsg.txt with event logs
|
Created attachment 1021 [details] Repro code for the issue Calling SDL_CreateWindowFrom can lead to a stack overflow in the event handler (WIN_WindowProc.) It doesn't matter whether the window is an SDL window or not. This behaviour doesn't occur under Linux, so this is likely an issue with how event hooking is done in the windows-specific code. Commenting out the line "return CallWindowProc(data->wndproc, hwnd, msg, wParam, lParam);" in "video\windows\SDL_windowevents.c" stops the overflow from happening, and a 'printf("%d\n", data->wndproc)' shows that the same wndproc is being called recursively. Attached is a simple program reproducing the issue.