From ad67f58c3f23f3be8f5171d7b232d0a82ffa2a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 25 Dec 2016 14:35:16 +0100 Subject: [PATCH] fix heap use after free when terminating and pass CXXFLAGS to linker the heap use after free we had applied locally when searching for memleaks a few days ago, but I guess the change went missing somehow. pass CXXFLAGS to the linker, when building with -fsanitize=address,undefined linking fails otherwise --- Makefile | 2 +- game/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fdd619f..3a266c6 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ ENGINE_LDFLAGS = \ all: $(GAME_BIN) $(GAME_BIN): $(GAME_OBJECTS) - $(CXX) $(GAME_OBJECTS) $(ENGINE_LDFLAGS) -o $@ + $(CXX) $(CXXFLAGS) $(GAME_OBJECTS) $(ENGINE_LDFLAGS) -o $@ $(STRIP) $@ .cpp.o: $(DEP_DIR)/%.d diff --git a/game/main.cpp b/game/main.cpp index e4fecac..6eefdb0 100644 --- a/game/main.cpp +++ b/game/main.cpp @@ -400,6 +400,6 @@ int neoMain(FrameTimer &timer, a::Audio &audio, r::World &world_, int, char **, //audio.setPan(handle, direction.x); } - delete gWorld; +// delete gWorld; return 0; }