Skip to content

Commit 0e45984

Browse files
Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
0 parents  commit 0e45984

File tree

1,596 files changed

+468120
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,596 files changed

+468120
-0
lines changed

.hgignore

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
syntax:glob
2+
aclocal.m4
3+
autom4te*
4+
config.cache
5+
config.log
6+
config.status
7+
Makefile
8+
sdl-config
9+
SDL2.spec
10+
build
11+
Build
12+
13+
# for Xcode
14+
*.orig
15+
*.swp
16+
*.tmp
17+
*.rej
18+
*~
19+
*.o
20+
*.mode1*
21+
*.perspective*
22+
*.pbxuser
23+
(^|/)build($|/)
24+
.DS_Store
25+
xcuserdata
26+
*.xcworkspace
27+
28+
# for Visual C++
29+
Debug
30+
Release
31+
*.user
32+
*.ncb
33+
*.suo
34+
*.sdf
35+
VisualC/tests/loopwave/sample.wav
36+
VisualC/tests/testautomation/CompareSurfaces0001_Reference.bmp
37+
VisualC/tests/testautomation/CompareSurfaces0001_TestOutput.bmp
38+
VisualC/tests/testgamecontroller/axis.bmp
39+
VisualC/tests/testgamecontroller/button.bmp
40+
VisualC/tests/testgamecontroller/controllermap.bmp
41+
VisualC/tests/testoverlay2/moose.dat
42+
VisualC/tests/testrendertarget/icon.bmp
43+
VisualC/tests/testrendertarget/sample.bmp
44+
VisualC/tests/testscale/icon.bmp
45+
VisualC/tests/testscale/sample.bmp
46+
VisualC/tests/testsprite2/icon.bmp
47+
VisualC/visualtest/icon.bmp
48+
VisualC/visualtest/testquit.actions
49+
VisualC/visualtest/testquit.config
50+
VisualC/visualtest/testquit.exe
51+
VisualC/visualtest/testquit.parameters
52+
VisualC/visualtest/testsprite2.exe
53+
VisualC/visualtest/testsprite2_sample.actions
54+
VisualC/visualtest/testsprite2_sample.config
55+
VisualC/visualtest/testsprite2_sample.parameters
56+
57+
# for Android
58+
android-project/local.properties
59+
60+
sdl.pc
61+
test/autom4te*
62+
test/config.cache
63+
test/config.log
64+
test/config.status
65+
test/Makefile
66+
test/SDL2.dll
67+
test/checkkeys
68+
test/controllermap
69+
test/loopwave
70+
test/loopwavequeue
71+
test/testatomic
72+
test/testaudiohotplug
73+
test/testaudioinfo
74+
test/testautomation
75+
test/testdraw2
76+
test/testdrawchessboard
77+
test/testdropfile
78+
test/testerror
79+
test/testfile
80+
test/testgamecontroller
81+
test/testgesture
82+
test/testgl2
83+
test/testgles
84+
test/testgles2
85+
test/testhaptic
86+
test/testhittesting
87+
test/testhotplug
88+
test/testiconv
89+
test/testime
90+
test/testintersections
91+
test/testjoystick
92+
test/testkeys
93+
test/testloadso
94+
test/testlock
95+
test/testmessage
96+
test/testmultiaudio
97+
test/testnative
98+
test/testoverlay2
99+
test/testplatform
100+
test/testpower
101+
test/testfilesystem
102+
test/testrelative
103+
test/testrendercopyex
104+
test/testrendertarget
105+
test/testresample
106+
test/testrumble
107+
test/testscale
108+
test/testsem
109+
test/testshader
110+
test/testshape
111+
test/testsprite2
112+
test/testspriteminimal
113+
test/teststreaming
114+
test/testthread
115+
test/testtimer
116+
test/testver
117+
test/testviewport
118+
test/testwm2
119+
test/torturethread
120+
test/*.exe
121+
test/*.dSYM
122+
buildbot
123+
test/buildbot

Android.mk

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
###########################
4+
#
5+
# SDL shared library
6+
#
7+
###########################
8+
9+
include $(CLEAR_VARS)
10+
11+
LOCAL_MODULE := SDL2
12+
13+
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
14+
15+
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
16+
17+
LOCAL_SRC_FILES := \
18+
$(subst $(LOCAL_PATH)/,, \
19+
$(wildcard $(LOCAL_PATH)/src/*.c) \
20+
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
21+
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
22+
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
23+
$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
24+
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
25+
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
26+
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
27+
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
28+
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
29+
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
30+
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
31+
$(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
32+
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
33+
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
34+
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
35+
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
36+
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
37+
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
38+
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
39+
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
40+
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
41+
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
42+
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
43+
$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
44+
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
45+
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
46+
$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
47+
$(wildcard $(LOCAL_PATH)/src/test/*.c))
48+
49+
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
50+
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
51+
52+
include $(BUILD_SHARED_LIBRARY)
53+
54+
###########################
55+
#
56+
# SDL static library
57+
#
58+
###########################
59+
60+
LOCAL_MODULE := SDL2_static
61+
62+
LOCAL_MODULE_FILENAME := libSDL2
63+
64+
LOCAL_SRC_FILES += $(subst $(LOCAL_PATH)/,,$(LOCAL_PATH)/src/main/android/SDL_android_main.c)
65+
66+
LOCAL_LDLIBS :=
67+
LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
68+
69+
include $(BUILD_STATIC_LIBRARY)

BUGS.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Bugs are now managed in the SDL bug tracker, here:
3+
4+
http://bugzilla.libsdl.org/
5+
6+
You may report bugs there, and search to see if a given issue has already
7+
been reported, discussed, and maybe even fixed.
8+
9+
10+
You may also find help on the SDL mailing list. Subscription information:
11+
12+
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
13+
14+
Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
15+
bugs discussed on the mailing list may be forgotten or missed.
16+

0 commit comments

Comments
 (0)