-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NULL pointer dereference on integrated GPU #4
Comments
The issue is still not fixed. jwerle has not implemented the simple NULL check.
|
Hi everyone. I'm not sure whether arf20 comment implies I am ought to do something. I haven't been working with OpenGL (and therefore with SOIL) for quite some time, so I'd rather choose to not dig into the problem too much. And I don't have integrated graphics for tests anymore anyway. There is pull request from me even though it's not attached to the issue. It does implement fix (i.e the simple pointer NULL check) to my problem in function query_NPOT_capability. It shouldn't be too hard to make the same fix yourself. Just in another function (soil.c:1903 ->query_tex_rectangle_capability). And obviously to test it straight away. I have to point out my fix might be a bit wrong. Cause if glGetString_extentions_ptr != NULL -> "capability none" and thus if ptr == NULL -> "capability present" (soil.c:1880), which probably has to be the other way around. But maybe I did it this way because "capability none" actually resulted in other problems. If there is need for a simple solution. Considering there are many simillar functions and glGetString everywhere and the docs say "If an error is generated, glGetString returns 0". There might be a deeper look required. I.e. catching the error before everything crashes and then looking into it. Previously I missed this part cause I was too newbie I guess. But like I said I'd rather not write any code myself, sorry. |
I did not mean to annoy you, sorry. SOIL segfaults when using remote X11 servers such as VcXSrv on Windows. While there is a pull request, and it is merged, I chose to use SOIL because it was already in the debian repository, which is not yet updated. So I moved to use |
Hi, I have my little OpenGL project that uses SOIL.
On my home PC with RX 580 it runs just fine. On my working PC with i7-9700 and Intel UHD Graphics 630 there is an error in function query_NPOT_capability(void), line strstr( (char const*)glGetString( GL_EXTENSIONS ), "GL_ARB_texture_non_power_of_two" ) ).
Because (char const*)glGetString( GL_EXTENSIONS ) returns null pointer and strstr tries to dereference it.
Why do I think this is an integrated GPU issue? Well, can't say for sure. I've seen assumptions of it on the internet. Then I made an experiment which kinda proved it.
I also made a simple fix by adding NULL check.
The text was updated successfully, but these errors were encountered: