Skip to content

Commit 6fdfedb

Browse files
authored
Fix codeql compilation error (bytecodealliance#3461)
Update OS to ubuntu-22.04 and install `libgcc-12-dev lib32gcc-12-dev` instead of `libgcc-11-dev lib32gcc-11-dev`. And fix a bh_assert condition typo error. ps. https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/9183310069/job/25253782329
1 parent f143344 commit 6fdfedb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/scripts/codeql_buildscript.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
sudo apt update
99

10-
sudo apt install -y build-essential cmake g++-multilib libgcc-11-dev lib32gcc-11-dev ccache ninja-build ccache
10+
sudo apt install -y build-essential cmake g++-multilib libgcc-12-dev lib32gcc-12-dev ccache ninja-build
1111

1212
WAMR_DIR=${PWD}
1313

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# - https://gh.io/supported-runners-and-hardware-resources
2929
# - https://gh.io/using-larger-runners
3030
# Consider using larger runners for possible analysis time improvements.
31-
runs-on: ${{ (matrix.language == 'swift' && 'macos-13') || 'ubuntu-20.04' }}
31+
runs-on: ${{ (matrix.language == 'swift' && 'macos-13') || 'ubuntu-22.04' }}
3232
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
3333
permissions:
3434
actions: read

core/iwasm/interpreter/wasm_runtime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,8 @@ instantiate_struct_global_recursive(WASMModule *module,
926926
wasm_type = module->types[heap_type];
927927

928928
bh_assert(wasm_type->type_flag == WASM_TYPE_STRUCT
929-
&& wasm_type->type_flag == WASM_TYPE_ARRAY
930-
&& wasm_type->type_flag == WASM_TYPE_FUNC);
929+
|| wasm_type->type_flag == WASM_TYPE_ARRAY
930+
|| wasm_type->type_flag == WASM_TYPE_FUNC);
931931

932932
if (wasm_type->type_flag == WASM_TYPE_STRUCT) {
933933
WASMStructNewInitValues *init_values1 =

0 commit comments

Comments
 (0)