File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
jobs :
10
10
test :
11
- runs-on : " ubuntu-18 .04"
11
+ runs-on : " ubuntu-20 .04"
12
12
env :
13
13
OPENRESTY_PREFIX : " /usr/local/openresty"
14
14
39
39
40
40
- name : Get dependencies
41
41
run : |
42
- sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl luarocks
42
+ sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl luarocks libubsan0
43
43
sudo luarocks install lua-resty-http > build.log 2>&1 || (cat build.log && exit 1)
44
44
45
45
wget https://github.com/tinygo-org/tinygo/releases/download/v0.20.0/tinygo_0.20.0_amd64.deb
55
55
wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh
56
56
chmod +x build-apisix-base.sh
57
57
OR_PREFIX=$OPENRESTY_PREFIX CC="clang -fsanitize=address -fcolor-diagnostics -Qunused-arguments" \
58
- cc_opt="-Werror" ./build-apisix-base.sh latest
58
+ cc_opt="-Werror -fsanitize=undefined" \
59
+ ld_opt="-lubsan" \
60
+ ./build-apisix-base.sh latest
59
61
60
62
- name : Script
61
63
run : |
Original file line number Diff line number Diff line change @@ -199,6 +199,10 @@ ngx_http_wasm_init(ngx_conf_t *cf)
199
199
}
200
200
201
201
202
+ /* To avoid complex error handling, we choose to allocate several objects together.
203
+ * The downside is that the objects are not alignment, but it is fine under x86 & ARM64, which
204
+ * are the only platforms supported by most of the Wasm VM. */
205
+ __attribute__((no_sanitize ("undefined" )))
202
206
void *
203
207
ngx_http_wasm_load_plugin (const char * name , size_t name_len ,
204
208
const char * bytecode , size_t size )
You can’t perform that action at this time.
0 commit comments