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 88
99jobs :
1010  test :
11-     runs-on : " ubuntu-18 .04" 
11+     runs-on : " ubuntu-20 .04" 
1212    env :
1313      OPENRESTY_PREFIX : " /usr/local/openresty" 
1414
3939
4040      - name : Get dependencies 
4141        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  
4343          sudo luarocks install lua-resty-http > build.log 2>&1 || (cat build.log && exit 1) 
4444
4545          wget https://github.com/tinygo-org/tinygo/releases/download/v0.20.0/tinygo_0.20.0_amd64.deb 
5555          wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh 
5656          chmod +x build-apisix-base.sh 
5757          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 
5961
6062       - name : Script 
6163        run : | 
Original file line number Diff line number Diff line change @@ -199,6 +199,10 @@ ngx_http_wasm_init(ngx_conf_t *cf)
199199}
200200
201201
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" )))
202206void  * 
203207ngx_http_wasm_load_plugin (const  char  * name , size_t  name_len ,
204208                          const  char  * bytecode , size_t  size )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments