mirror of
https://github.com/yawut/SDL.git
synced 2026-09-01 21:55:07 -05:00
Fixed global suite declaration segfault via external linkage declaration
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
CFLAGS := -W -Wall -Wextra -g `sdl-config --cflags` -DSDL_NO_COMPAT
|
||||
LDFLAGS := `sdl-config --libs`
|
||||
CFLAGS := -W -Wall -Wextra -g `sdl-config --prefix=/usr/local --cflags` -DSDL_NO_COMPAT
|
||||
LDFLAGS := `sdl-config --prefix=/usr/local --libs`
|
||||
|
||||
# If it doesn't pick up defaults
|
||||
#CFLAGS := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL
|
||||
|
||||
3524
test/configure
vendored
3524
test/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -106,11 +106,7 @@ int main(int argc, char *argv[]) {
|
||||
fflush(stdout);
|
||||
|
||||
for(reference = tests[counter]; reference; reference = tests[++counter]) {
|
||||
// segfaults immediately after trying to access name -> out of bounds
|
||||
// all the values of reference is garbage.
|
||||
char *testname = reference->name;
|
||||
//char *testname = reference; // for some reason this works
|
||||
|
||||
printf("Running %s (in %s):\n", testname, libName);
|
||||
|
||||
int childpid = fork();
|
||||
|
||||
@@ -27,15 +27,21 @@
|
||||
|
||||
#include "SDL_test.h"
|
||||
|
||||
TestCaseReference *references[] = {
|
||||
{"hello", "description", 1, 0},
|
||||
{"hello2", "description", 1, 0},
|
||||
NULL
|
||||
/* Test cases */
|
||||
static const TestCaseReference test1 =
|
||||
(TestCaseReference){ "hello", "description", 1, 0 };
|
||||
|
||||
static const TestCaseReference test2 =
|
||||
(TestCaseReference){ "hello2", "description", 1, 0 };
|
||||
|
||||
/* Test suite */
|
||||
extern const TestCaseReference *testSuite[] = {
|
||||
&test1, &test2, NULL
|
||||
};
|
||||
|
||||
|
||||
TestCaseReference **QueryTestCaseReferences() {
|
||||
return references;
|
||||
return (TestCaseReference **)testSuite;
|
||||
}
|
||||
|
||||
void hello(void *arg){
|
||||
|
||||
Reference in New Issue
Block a user