Skip to content

Commit

Permalink
ci: check update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Mar 12, 2023
1 parent a5cac5f commit 2320045
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/asan.supp
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ leak:DSA_generate_parameters_ex
# MacOS
leak:_objc_init
leak:localtime_r
leak:pthread_once
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: cpp-coveralls
run: pip install cpp-coveralls PyYAML
- name: depends
run: sudo apt update && sudo apt install -y libssl-dev libuv1-dev
run: sudo apt update && sudo apt install -y libuv1-dev
- name: run
run: |
.github/shell/setup_lua.sh
Expand All @@ -37,7 +37,7 @@ jobs:
with:
submodules: recursive
- name: depends
run: sudo apt update && sudo apt install -y libssl-dev luajit libluajit-5.1-dev valgrind
run: sudo apt update && sudo apt install -y luajit libluajit-5.1-dev valgrind
- name: run
run: make valgrind

Expand All @@ -48,10 +48,10 @@ jobs:
with:
submodules: recursive
- name: depends
run: brew install [email protected] llvm && brew install --HEAD luajit && brew install pkg-config
run: brew install --HEAD luajit
- name: run
env:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
PKG_CONFIG_PATH: /usr/local/opt/openssl@1.1/lib/pkgconfig
ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1
CC: clang
LD: clang
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,16 @@ valgrind: all

asan: all
ifneq (, $(findstring apple, $(SYS)))
export ASAN_LIB=$(ASAN_LIB) && \
cd test && LUA_CPATH=$(shell pwd)/?.so \
ASAN_LIB=$(ASAN_LIB) \
LSAN_OPTIONS=suppressions=${shell pwd}/.github/asan.supp \
DYLD_INSERT_LIBRARIES=$(ASAN_LIB) \
$(LUA) test.lua && cd ..
endif
ifneq (, $(findstring linux, $(SYS)))
export ASAN_LIB=$(ASAN_LIB) && \
cd test && LUA_CPATH=$(shell pwd)/?.so \
ASAN_LIB=$(ASAN_LIB) \
LSAN_OPTIONS=suppressions=${shell pwd}/.github/asan.supp \
LD_PRELOAD=$(ASAN_LIB) \
$(LUA) test.lua && cd ..
endif
Expand Down
2 changes: 1 addition & 1 deletion src/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ int openssl_push_general_name(lua_State*L, const GENERAL_NAME* general_name)
lua_setfield(L, -2, "type");
break;
case GEN_X400:
#if OPENSSL_VERSION_NUMBER >= 0x1010114fL && !defined(LIBRESSL_VERSION_NUMBER)
#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
PUSH_ASN1_STRING(L, general_name->d.x400Address);
#else
openssl_push_asn1type(L, general_name->d.x400Address);
Expand Down
2 changes: 1 addition & 1 deletion test/9.ocsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function TestOCSP:testAll()
local der = assert(oreq:export(false))
assert(type(der)=='string')

-- avoid resign a ocsp request object, or memleaks
-- avoid resign a ocsp request object
oreq = assert(ocsp.request_read(der, false))
assert(oreq:sign(ocert, okey))
oreq = assert(ocsp.request_read(der, false))
Expand Down

0 comments on commit 2320045

Please sign in to comment.