| Summary: | Endless loop in SDL_InitDynamicAPI | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Rudolf Polzer <divVerent> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.0 | Keywords: | target-2.0.12 |
| Hardware: | All | ||
| OS: | All | ||
|
Description
Rudolf Polzer
2019-09-14 01:09:48 UTC
As a suggested fix, I propose changing
286 if (!entry) {
287 if (!initialize_jumptable(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) {
288 /* !!! FIXME: now we're screwed. Should definitely abort now. */
289 }
290 }
to simply
286 if (!initialize_jumptable(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) {
287 /* !!! FIXME: now we're screwed. Should definitely abort now. */
288 }
Also, at least some error messages would really do this function good...
(In reply to Rudolf Polzer from comment #0) > libSDL2.so is 2.0.10 and ./someprogram is statically linked against 2.0.9, > [...] > - The loaded library (2.0.9) refuses to fill in a 2.0.10 jump table because > a new call got added: > https://hg.libsdl.org/SDL/file/2ede888544ac/src/dynapi/SDL_dynapi.c#l182 But the loaded library should be 2.0.10, the statically-linked version is 2.0.9, and it should have a tablesize that's less than sizeof (jump_table) at this point. (Unless I'm misreading this code and missing the bug) we had to be in the wrong entry point here (2.0.10 library calling into static 2.0.9's SDL_DYNAPI_entry. I'll try to reproduce here. --ryan. Sorry, I made a mistake in the OP. In my concrete scenario, the statically linked version was 2.0.10 and the .so was 2.0.9. This is not supposed to work, but it should not loop endlessly either. Desired result is either an error or a warning being printed, and the program either continuing or exiting, but not looping endlessly. (In reply to Rudolf Polzer from comment #3) > This is not supposed to work, but it should not loop endlessly either. Oh, I see. Yes, that sounds like a bug. --ryan. We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc). As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change! Thanks, --ryan. We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc). As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change! Thanks, --ryan. This should be fixed with https://hg.libsdl.org/SDL/rev/eaac8e676d45 ! --ryan. |