Merge main branch into dev/shared_heap#4355
Merge main branch into dev/shared_heap#4355lum1n0us wants to merge 207 commits intodev/shared_heapfrom
Conversation
Rust compiler previously deprecated, and now removed the wasm32-wasi target and replaced it with wasm32-wasip1. This change updates all the occurrences of wasm32-wasi in the context of Rust compilation. covers the wasi-nn/test.
- Add AOT module validation to ensure memory constraints are met - Enable AOT validator in build configuration and update related source files
- add default build configuration options and enhance message output for WAMR features - Add Wasm proposal status printing functionality
…droid compilation workflow
- Enhance wasm mutator fuzz tests by adding export function execution and random value generation - Use --fuel to limit loop size - Use predefined values and enhance argument logging in execution
…es (#4064) fix enlarge 65536 pages conversion overflow in wasm32
> **Fix a release-blocking issue** --- Like: ``` vmlib.lib(blocking_op.obj) : error LNK2019: unresolved external symbol __imp_wasm_runtime_begin_blocking_op referenced in function blocking_op_close [D:\a\wasm-micro-runtime\wasm-micro-runtime\wamr-compiler\build\wamrc.vcxproj] vmlib.lib(blocking_op.obj) : error LNK2019: unresolved external symbol __imp_wasm_runtime_end_blocking_op referenced in function blocking_op_close [D:\a\wasm-micro-runtime\wasm-micro-runtime\wamr-compiler\build\wamrc.vcxproj] ```
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.1 to 2.4.2. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](ossf/scorecard-action@f49aabe...05b42c6) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-version: 2.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4309) it seems meaningless and quite confusing to access a table with two aliases ("lookup" and "backends") within a function. no functional changes are intended.
sync with a more appropriate version of the definitions. as we use the "wasi_ephemeral_nn", which is p1-based, it seems more appropriate to use definitions from witx, not wit. it's a bit unfortunate p2-based wasi-nn made gratuitous changes like this from p1. note: this is an ABI change.
tested with openvino
this would avoid potential issues when multiple instances happen to make an attempt to load a backend at the same time. Fixes: #4314
this would fix undefined symbol errors by making it clear these functions are imported. references: https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/llvm/lib/MC/WasmObjectWriter.cpp#L1798-L1799 https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/llvm/lib/Object/WasmObjectFile.cpp#L749-L752 https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/lld/wasm/Symbols.cpp#L203 https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/lld/wasm/Relocations.cpp#L36-L40
…4321) By default, zip follows symbolic links and includes the actual files or directories they point to in the archive.
Use a minimum manifest to reduce time consumption
* this enum is (@WitX tag u8) in witx * it seems that some wasm modules actually use non-zero padding and cause errors * it's a bad practice to use C enum for ABI description anyway
- wasi_nn.h: make this compatible with wasi_ephemeral_nn cf. #4323 - fix WASM_ENABLE_WASI_EPHEMERAL_NN build this structure is used by host logic as well. ideally definitions for wasm and host should be separated. until it happens, check __wasm__ to avoid the breakage.
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.28.19. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v3.28.18...v3.28.19) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.19 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| * but if GC is enabled, we need to check the type flag | ||
| */ | ||
| static bool | ||
| check_function_type(const WASMModule *module, uint32 type_index, |
Check notice
Code scanning / CodeQL
Unused static function Note
Copilot Autofix
AI 10 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| } | ||
|
|
||
| static int | ||
| cmp_v128_const(const void *p_v128_const1, const void *p_v128_const2) |
Check notice
Code scanning / CodeQL
Unused static function Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the issue, the unused static function cmp_v128_const should be removed from the file. Additionally, the alert indicates that wasm_loader_prepare_bytecode must also be removed, as it is similarly unused. Care should be taken to ensure that no dependencies or references to these functions exist elsewhere in the file or project.
Steps to implement the fix:
- Remove the definition of
cmp_v128_const(lines 9644–9651). - Remove the definition of
wasm_loader_prepare_bytecode(lines 11262–11281). - Verify that no other code in the file or project depends on these functions.
| @@ -9643,10 +9643,3 @@ | ||
|
|
||
| static int | ||
| cmp_v128_const(const void *p_v128_const1, const void *p_v128_const2) | ||
| { | ||
| V128 v128_const1 = *(V128 *)p_v128_const1; | ||
| V128 v128_const2 = *(V128 *)p_v128_const2; | ||
|
|
||
| return memcmp(&v128_const1, &v128_const2, sizeof(V128)); | ||
| } | ||
|
|
||
| @@ -11261,22 +11254,3 @@ | ||
|
|
||
| static bool | ||
| wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, | ||
| uint32 cur_func_idx, char *error_buf, | ||
| uint32 error_buf_size) | ||
| { | ||
| uint8 *p = func->code, *p_end = func->code + func->code_size, *p_org; | ||
| uint32 param_count, local_count, global_count; | ||
| uint8 *param_types, *local_types, local_type, global_type, mem_offset_type, | ||
| table_elem_idx_type; | ||
| BlockType func_block_type; | ||
| uint16 *local_offsets, local_offset; | ||
| uint32 type_idx, func_idx, local_idx, global_idx, table_idx; | ||
| uint32 table_seg_idx, data_seg_idx, count, align, i; | ||
| mem_offset_t mem_offset; | ||
| int32 i32_const = 0; | ||
| int64 i64_const; | ||
| uint8 opcode; | ||
| bool return_value = false; | ||
| WASMLoaderContext *loader_ctx; | ||
| BranchBlock *frame_csp_tmp; | ||
|
|
||
| #if WASM_ENABLE_GC != 0 |
| #include "../common/libc_wasi.c" | ||
| #endif | ||
|
|
||
| #include "../common/wasm_proposal.c" |
Check notice
Code scanning / CodeQL
Include header files only Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix this problem, the code should not include the .c source file directly. Instead, the declarations (function prototypes, types, etc.) from wasm_proposal.c should be moved to a new header file, for example, wasm_proposal.h. The source file wasm_proposal.c should then be compiled separately and linked as part of the build process. In main.c, replace #include "../common/wasm_proposal.c" with #include "../common/wasm_proposal.h". This change should be made only in the code shown (i.e., in main.c), and assumes that the build system will be updated to compile wasm_proposal.c as a separate compilation unit.
| @@ -18,7 +18,7 @@ | ||
| #include "../common/libc_wasi.c" | ||
| #endif | ||
|
|
||
| #include "../common/wasm_proposal.c" | ||
| #include "../common/wasm_proposal.h" | ||
|
|
||
| #if BH_HAS_DLFCN | ||
| #include <dlfcn.h> |
| # Initializes the CodeQL tools for scanning. | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3.28.8 | ||
| uses: github/codeql-action/init@v3.28.19 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
| ./.github/scripts/codeql_buildscript.sh | ||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v3.28.8 | ||
| uses: github/codeql-action/analyze@v3.28.19 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
|
|
||
| - name: Upload CodeQL results to code scanning | ||
| uses: github/codeql-action/upload-sarif@v3.28.8 | ||
| uses: github/codeql-action/upload-sarif@v3.28.19 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
| llvm_cache_key: ${{ needs.build_llvm_libraries_on_windows.outputs.cache_key }} | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
| # it is hard to use `format` to assemble the cache key | ||
| - name: Get LLVM libraries | ||
| id: retrieve_llvm_libs | ||
| uses: actions/cache@v4 |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
|
|
||
| # hadolint ignore=DL3013 | ||
| RUN pip3 install --no-cache-dir west && west init -m https://github.com/zephyrproject-rtos/zephyr --mr v3.5.0 /root/zephyrproject | ||
| RUN pip3 install --no-cache-dir west |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
| WORKDIR /root | ||
| RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git | ||
| WORKDIR /root/zephyrproject/modules/zephyr | ||
| RUN west zephyr-export && pip install --no-cache-dir -r ./scripts/requirements.txt |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
No description provided.