mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-07 07:50:58 +00:00
Removed test that triggers an asan overflow warning
Fixes https://github.com/libsdl-org/SDL/issues/8884
This commit is contained in:
parent
ca2c9f680b
commit
490f7af92b
1 changed files with 2 additions and 0 deletions
|
@ -1059,12 +1059,14 @@ static int sdltest_randomIntegerInRange(void *arg)
|
||||||
SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(max,min)");
|
SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(max,min)");
|
||||||
SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
|
SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
|
||||||
|
|
||||||
|
#if 0 /* This test correctly triggers an asan warning: runtime error: signed integer overflow: 2147483647 + 4239 cannot be represented in type 'int' */
|
||||||
/* Range with min at integer limit */
|
/* Range with min at integer limit */
|
||||||
min = long_min;
|
min = long_min;
|
||||||
max = long_max + (Sint32)SDLTest_RandomSint16();
|
max = long_max + (Sint32)SDLTest_RandomSint16();
|
||||||
result = SDLTest_RandomIntegerInRange(min, max);
|
result = SDLTest_RandomIntegerInRange(min, max);
|
||||||
SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)");
|
SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)");
|
||||||
SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
|
SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Range with max at integer limit */
|
/* Range with max at integer limit */
|
||||||
min = long_min - (Sint32)SDLTest_RandomSint16();
|
min = long_min - (Sint32)SDLTest_RandomSint16();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue