File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 env :
1515 CC : ${{matrix.cc}}
1616 CXX : ${{matrix.cxx}}
17+ CXXFLAGS : ${{matrix.env_cxxflags}}
18+ LDFLAGS : ${{matrix.env_ldflags}}
1719 defaults :
1820 run :
1921 shell : bash
@@ -51,13 +53,15 @@ jobs:
5153 cxx : clang++-19
5254 os : ubuntu-latest
5355 container : ubuntu:24.04
54- build_options : " CXXFLAGS='-fsanitize=address,undefined -g' LDFLAGS='-fsanitize=address,undefined'"
56+ env_cxxflags : " -fsanitize=address,undefined"
57+ env_ldflags : " -fsanitize=address,undefined"
5558
5659 - name : clang-sanitizer-macOS
5760 cc : clang
5861 cxx : clang++
5962 os : macos-latest
60- build_options : " CXXFLAGS='-fsanitize=address,undefined -g' LDFLAGS='-fsanitize=address,undefined'"
63+ env_cxxflags : " -fsanitize=address,undefined"
64+ env_ldflags : " -fsanitize=address,undefined"
6165
6266 steps :
6367 - name : Checkout
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ GMAKE = make mode=$(mode)
3636NAME := sqlparser
3737PARSER_CPP = $(SRCPARSER ) /bison_parser.cpp $(SRCPARSER ) /flex_lexer.cpp
3838PARSER_H = $(SRCPARSER ) /bison_parser.h $(SRCPARSER ) /flex_lexer.h
39- LIB_CFLAGS = -std=c++17 $(OPT_FLAG )
39+ LIB_CFLAGS = -std=c++17 $(OPT_FLAG ) $(CXXFLAGS )
40+ LIB_LFLAGS = $(LDFLAGS )
41+
4042
4143relaxed_build ?= "off"
4244ifeq ($(relaxed_build ) , on)
@@ -54,12 +56,12 @@ static ?= no
5456ifeq ($(static ) , yes)
5557 LIB_BUILD = lib$(NAME).a
5658 LIBLINKER = $(AR)
57- LIB_LFLAGS = rs
59+ LIB_LFLAGS + = rs
5860else
5961 LIB_BUILD = lib$(NAME).so
6062 LIBLINKER = $(CXX)
6163 LIB_CFLAGS += -fPIC
62- LIB_LFLAGS = -shared -o
64+ LIB_LFLAGS + = -shared -o
6365endif
6466LIB_CPP = $(sort $(shell find $(SRC ) -name '* .cpp' -not -path "$(SRCPARSER ) /* ") $(PARSER_CPP ) )
6567LIB_H = $(shell find $(SRC ) -name '* .h' -not -path "$(SRCPARSER ) /* ") $(PARSER_H )
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ TEST(SQLParserTokenizeStringifyTest) {
4343 ASSERT (&query != &cache[token_string]);
4444}
4545
46+ // Regression test for the memory leak reported in issue #261.
4647TEST (SQLParserTokenizeLeakRegressionTest) {
4748
4849 const std::string query = " 'string_1' 'string_2' 'string_3';" ;
@@ -55,4 +56,4 @@ TEST(SQLParserTokenizeLeakRegressionTest) {
5556 ASSERT_EQ (tokens[1 ], SQL_STRING );
5657 ASSERT_EQ (tokens[2 ], SQL_STRING );
5758 ASSERT_EQ (tokens[3 ], ' ;' );
58- }
59+ }
You can’t perform that action at this time.
0 commit comments