Repository navigation
Fix calling convention of glGetStringi pointer in GLProbe - #1059
Coastrnaut wants to merge 1 commit into
Conversation
GetStringiFn was declared as a plain function pointer, without the GL calling convention. On 32-bit Windows, GL functions are __stdcall, so each call through it left the stack unbalanced, and x86 Release builds failed their stack cookie check at startup. Use glad's PFNGLGETSTRINGIPROC, which carries GLAD_API_PTR, like the other pointers in the struct get from decltype.
|
Oh, thanks for the large amount of PRs, which look useful. Also thanks for splitting changes up contextually, this will make reviewing them a breeze! I've been building quite some backlog of PRs to review for the past few weeks, so bear with me as I'm slowly working through it as time allows! |
|
Any chance you can re-add me to the repos with push access? I am Robert Pancoast, original author of the ump frontend. I am already in authors.txt. Used to be a maintainer, but deleted my Githuub account. Since then I have recreated a new Github account and started dev work again. I want to merge all my changes upstream and get the store apps working again for Windows Store/Xbos. Also, just finished the iOS app using the new iOS 27, system app capture api for loopback. I would like to merge the required changes upstream for iOS and add both windows store and iOS store builds to the ci. |
ResolvedGLFunctions::GetStringiFninGLProbe.cppwas declared as a plain function pointer, without the GL calling convention:On 32-bit Windows, GL functions are
__stdcall, so each call through this pointer leaves the stack unbalanced. In the Windows Store app, x86 Release builds fail their stack cookie check (0xc0000409) at startup. 64-bit builds are unaffected, since x64 has one calling convention.This declares it as glad's
PFNGLGETSTRINGIPROC, which includesGLAD_API_PTR. The other pointers in the struct already get the convention fromdecltype. Bothglad/gl.handglad/gles2.hdefine the type.Desktop Win32 CI doesn't catch this because those builds don't crash on it. #1058 proposes a UWP build job that would.
Testing
Retested on current master (2026-11-12)