mirror of
https://github.com/Xahau/xahaud.git
synced 2026-07-11 09:10:10 +00:00
Compare commits
20 Commits
fixHookMem
...
coverage-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd616d807f | ||
|
|
98eb3be7af | ||
|
|
273273d7a2 | ||
|
|
c149351ccf | ||
|
|
436a0d5540 | ||
|
|
3834ec5997 | ||
|
|
6b3fb5ea14 | ||
|
|
83a6d14f7a | ||
|
|
10fbafe996 | ||
|
|
0342badb5d | ||
|
|
f8a30c528d | ||
|
|
fe162a99a9 | ||
|
|
132bcf6e57 | ||
|
|
5b4a6703ea | ||
|
|
51cd3ddf25 | ||
|
|
cf244334d3 | ||
|
|
43a37afb51 | ||
|
|
8d609f9cf3 | ||
|
|
94a62f5572 | ||
|
|
7b8d671f52 |
@@ -19,6 +19,15 @@ coverage:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 2%
|
||||
paths:
|
||||
# PeerImp is historically hard to exercise in the current unit-test
|
||||
# harness. Keep this list narrow; new testable code should remain
|
||||
# covered by the default patch gate.
|
||||
- "!src/xrpld/overlay/detail/PeerImp.cpp"
|
||||
historically-untested:
|
||||
target: 0%
|
||||
paths:
|
||||
- "src/xrpld/overlay/detail/PeerImp.cpp"
|
||||
changes: false
|
||||
|
||||
github_checks:
|
||||
|
||||
51
.github/actions/xahau-ga-dependencies/action.yml
vendored
51
.github/actions/xahau-ga-dependencies/action.yml
vendored
@@ -50,6 +50,10 @@ inputs:
|
||||
options:
|
||||
- libstdcxx
|
||||
- libcxx
|
||||
conan_deps_cxxflags:
|
||||
description: 'Extra cxxflags applied to Conan dependency package builds only (NOT the rippled build). JSON object keyed by Conan package pattern, e.g. {"grpc/*":["-Wno-foo"]}. Maps to <pattern>:tools.build:cxxflags.'
|
||||
required: false
|
||||
default: '{}'
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
@@ -81,6 +85,8 @@ runs:
|
||||
|
||||
- name: Configure Conan
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_DEPS_CXXFLAGS: ${{ inputs.conan_deps_cxxflags }}
|
||||
run: |
|
||||
# Create the default profile directory if it doesn't exist
|
||||
mkdir -p ~/.conan2/profiles
|
||||
@@ -105,7 +111,14 @@ runs:
|
||||
os=${{ inputs.os }}
|
||||
EOF
|
||||
|
||||
# Add buildenv and conf sections for Linux (not needed for macOS)
|
||||
# [buildenv] + [conf] sections.
|
||||
# Linux pins compiler executables; macOS uses the system toolchain.
|
||||
# conan_deps_cxxflags (matrix-driven) optionally adds package-pattern
|
||||
# scoped tools.build:cxxflags for Conan dependency builds only - typically
|
||||
# grpc workarounds for newer clang's stricter diagnostics. Because these
|
||||
# are profile-pattern scoped (e.g. grpc/*:...), they do NOT affect the
|
||||
# consumer/rippled toolchain generated for the main build.
|
||||
NEED_CONF=0
|
||||
if [ "${{ inputs.os }}" = "Linux" ] && [ -n "${{ inputs.cc }}" ]; then
|
||||
cat >> ~/.conan2/profiles/default <<EOF
|
||||
|
||||
@@ -116,16 +129,38 @@ runs:
|
||||
[conf]
|
||||
tools.build:compiler_executables={"c": "/usr/bin/${{ inputs.cc }}", "cpp": "/usr/bin/${{ inputs.cxx }}"}
|
||||
EOF
|
||||
NEED_CONF=1
|
||||
fi
|
||||
|
||||
# Add macOS-specific conf if needed
|
||||
if [ "${{ inputs.os }}" = "Macos" ]; then
|
||||
cat >> ~/.conan2/profiles/default <<EOF
|
||||
if [ -n "${CONAN_DEPS_CXXFLAGS}" ] && [ "${CONAN_DEPS_CXXFLAGS}" != "{}" ]; then
|
||||
CONAN_DEPS_CXXFLAGS_LINES="$(python3 - <<'PY'
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
[conf]
|
||||
# Workaround for gRPC with newer Apple Clang
|
||||
tools.build:cxxflags=["-Wno-missing-template-arg-list-after-template-kw"]
|
||||
EOF
|
||||
raw = os.environ["CONAN_DEPS_CXXFLAGS"]
|
||||
data = json.loads(raw)
|
||||
if not isinstance(data, dict):
|
||||
sys.exit("conan_deps_cxxflags must be a JSON object like {\"grpc/*\": [\"-Wno-...\"]}")
|
||||
|
||||
for pattern, flags in data.items():
|
||||
if not isinstance(pattern, str) or not pattern:
|
||||
sys.exit("conan_deps_cxxflags keys must be non-empty Conan package patterns")
|
||||
if pattern == "&":
|
||||
sys.exit("conan_deps_cxxflags must target dependency package patterns, not the consumer (&)")
|
||||
if not isinstance(flags, list) or not all(isinstance(flag, str) for flag in flags):
|
||||
sys.exit(f"{pattern}: cxxflags must be a JSON string list")
|
||||
if flags:
|
||||
print(f"{pattern}:tools.build:cxxflags={json.dumps(flags, separators=(',', ':'))}")
|
||||
PY
|
||||
)"
|
||||
if [ -n "${CONAN_DEPS_CXXFLAGS_LINES}" ] && [ "$NEED_CONF" = "0" ]; then
|
||||
echo "" >> ~/.conan2/profiles/default
|
||||
echo "[conf]" >> ~/.conan2/profiles/default
|
||||
fi
|
||||
if [ -n "${CONAN_DEPS_CXXFLAGS_LINES}" ]; then
|
||||
printf '%s\n' "${CONAN_DEPS_CXXFLAGS_LINES}" >> ~/.conan2/profiles/default
|
||||
fi
|
||||
fi
|
||||
|
||||
# Display profile for verification
|
||||
|
||||
3
.github/workflows/xahau-ga-macos.yml
vendored
3
.github/workflows/xahau-ga-macos.yml
vendored
@@ -107,6 +107,9 @@ jobs:
|
||||
compiler: apple-clang
|
||||
compiler_version: ${{ steps.detect-compiler.outputs.compiler_version }}
|
||||
stdlib: libcxx
|
||||
# grpc 1.50.1 trips clang-19+ -Werror=missing-template-arg-list-after-template-kw
|
||||
# on Apple Clang. Drop when grpc is bumped past the fix.
|
||||
conan_deps_cxxflags: '{"grpc/*":["-Wno-missing-template-arg-list-after-template-kw"]}'
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/xahau-ga-build
|
||||
|
||||
88
.github/workflows/xahau-ga-nix.yml
vendored
88
.github/workflows/xahau-ga-nix.yml
vendored
@@ -72,15 +72,26 @@ jobs:
|
||||
"job_type": "build"
|
||||
},
|
||||
{
|
||||
"compiler_id": "gcc-13-libstdcxx",
|
||||
"compiler": "gcc",
|
||||
"cc": "gcc-13",
|
||||
"cxx": "g++-13",
|
||||
"gcov": "gcov-13",
|
||||
"compiler_version": 13,
|
||||
"stdlib": "default",
|
||||
# Latest stable Clang for the most accurate source-based
|
||||
# coverage mapping (newer language features, fewer bugs in
|
||||
# llvm-cov region inference). Pulled from apt.llvm.org since
|
||||
# Ubuntu 24.04 default repos cap at clang-18.
|
||||
"compiler_id": "clang-20-libcxx",
|
||||
"compiler": "clang",
|
||||
"cc": "clang-20",
|
||||
"cxx": "clang++-20",
|
||||
"compiler_version": 20,
|
||||
"stdlib": "libcxx",
|
||||
"configuration": "Debug",
|
||||
"job_type": "coverage"
|
||||
"job_type": "coverage",
|
||||
"coverage_tool": "llvm",
|
||||
"coverage_format": "lcov",
|
||||
# grpc 1.50.1 uses `Foo::template Bar(...)` without an
|
||||
# angle-bracket arg list; clang-19+ promoted that to
|
||||
# -Werror. Drop when grpc is bumped past the fix.
|
||||
"conan_deps_cxxflags": {
|
||||
"grpc/*": ["-Wno-missing-template-arg-list-after-template-kw"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"compiler_id": "clang-14-libstdcxx-gcc11",
|
||||
@@ -131,7 +142,7 @@ jobs:
|
||||
# Minimal matrix for PRs and feature branches
|
||||
minimal_matrix = [
|
||||
full_matrix[1], # gcc-13 (middle-ground gcc)
|
||||
full_matrix[2], # gcc-13 coverage
|
||||
full_matrix[2], # clang-20 llvm-cov coverage
|
||||
full_matrix[3] # clang-14 (mature, stable clang)
|
||||
]
|
||||
|
||||
@@ -207,9 +218,9 @@ jobs:
|
||||
# Select the appropriate matrix
|
||||
if use_full:
|
||||
if force_full:
|
||||
print(f"Using FULL matrix (7 configs) - forced by [ci-nix-full-matrix] tag")
|
||||
print(f"Using FULL matrix (7 configs (build x6 + clang-20 llvm-cov coverage)) - forced by [ci-nix-full-matrix] tag")
|
||||
else:
|
||||
print(f"Using FULL matrix (7 configs) - targeting main branch")
|
||||
print(f"Using FULL matrix (7 configs (build x6 + clang-20 llvm-cov coverage)) - targeting main branch")
|
||||
matrix = full_matrix
|
||||
else:
|
||||
print(f"Using MINIMAL matrix (3 configs) - feature branch/PR")
|
||||
@@ -257,9 +268,25 @@ jobs:
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
# Bump apt's default 3 retries; papers over short upstream blips
|
||||
# like the recurring ppa.launchpadcontent.net outages.
|
||||
echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries
|
||||
apt-get update
|
||||
apt-get install -y software-properties-common
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
|
||||
# apt.llvm.org for Clang versions newer than what Ubuntu 24.04 ships
|
||||
# (24.04 default repos cap at clang-18). The bootstrap script adds
|
||||
# the LLVM apt source for the requested version and runs apt-get update.
|
||||
if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.compiler_version }}" -ge 19 ]; then
|
||||
apt-get install -y wget gnupg lsb-release
|
||||
wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
|
||||
chmod +x /tmp/llvm.sh
|
||||
# `all` installs clang + libllvm + lldb + lld + the llvm-N package
|
||||
# (which provides llvm-profdata-N / llvm-cov-N for coverage runs).
|
||||
/tmp/llvm.sh ${{ matrix.compiler_version }} all
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y git python3 python-is-python3 pipx
|
||||
pipx ensurepath
|
||||
@@ -332,10 +359,16 @@ jobs:
|
||||
pipx install "conan>=2.0,<3"
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install gcovr for coverage jobs
|
||||
# Install coverage tooling
|
||||
if [ "${{ matrix.job_type }}" = "coverage" ]; then
|
||||
pipx install "gcovr>=7,<9"
|
||||
apt-get install -y curl lcov
|
||||
if [ "${{ matrix.coverage_tool }}" = "llvm" ]; then
|
||||
# Native LLVM source-based coverage: llvm-profdata + llvm-cov.
|
||||
# The clang-N package doesn't pull these in; the llvm-N package does.
|
||||
apt-get install -y "llvm-${{ matrix.compiler_version }}"
|
||||
else
|
||||
pipx install "gcovr>=7,<9"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Check environment
|
||||
@@ -348,10 +381,15 @@ jobs:
|
||||
which ${{ matrix.cxx }} && ${{ matrix.cxx }} --version || echo "${{ matrix.cxx }} not found"
|
||||
which ccache && ccache --version || echo "ccache not found"
|
||||
|
||||
# Check gcovr for coverage jobs
|
||||
# Check coverage tooling
|
||||
if [ "${{ matrix.job_type }}" = "coverage" ]; then
|
||||
which gcov && gcov --version || echo "gcov not found"
|
||||
which gcovr && gcovr --version || echo "gcovr not found"
|
||||
if [ "${{ matrix.coverage_tool }}" = "llvm" ]; then
|
||||
which "llvm-profdata-${{ matrix.compiler_version }}" && "llvm-profdata-${{ matrix.compiler_version }}" --version || echo "llvm-profdata not found"
|
||||
which "llvm-cov-${{ matrix.compiler_version }}" && "llvm-cov-${{ matrix.compiler_version }}" --version || echo "llvm-cov not found"
|
||||
else
|
||||
which gcov && gcov --version || echo "gcov not found"
|
||||
which gcovr && gcovr --version || echo "gcovr not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "---- Full Environment ----"
|
||||
@@ -378,6 +416,7 @@ jobs:
|
||||
cc: ${{ matrix.cc }}
|
||||
cxx: ${{ matrix.cxx }}
|
||||
stdlib: ${{ matrix.stdlib }}
|
||||
conan_deps_cxxflags: ${{ matrix.conan_deps_cxxflags && toJson(matrix.conan_deps_cxxflags) || '{}' }}
|
||||
gha_cache_enabled: 'false' # Disable caching for self hosted runner
|
||||
|
||||
- name: Build
|
||||
@@ -410,8 +449,9 @@ jobs:
|
||||
cache_version: ${{ env.CACHE_VERSION }}
|
||||
main_branch: ${{ env.MAIN_BRANCH_NAME }}
|
||||
stdlib: ${{ matrix.stdlib }}
|
||||
# Coverage builds are slower due to instrumentation; use fewer parallel jobs to avoid flakiness
|
||||
cmake-args: '-Dcoverage=ON -Dcoverage_format=xml -Dcoverage_test_parallelism=$(($(nproc)/2)) -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_CXX_FLAGS="-O0" -DCMAKE_C_FLAGS="-O0"'
|
||||
# Coverage builds are slower due to instrumentation; use fewer parallel jobs to avoid flakiness.
|
||||
# Use *_FLAGS_DEBUG so the build action's stdlib flag (e.g. -stdlib=libc++) in CMAKE_CXX_FLAGS isn't clobbered.
|
||||
cmake-args: '-Dcoverage=ON -Dcoverage_tool=${{ matrix.coverage_tool }} -Dcoverage_format=${{ matrix.coverage_format }} -Dcoverage_test_parallelism=$(($(nproc)/2)) -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_CXX_FLAGS_DEBUG="-g -O0" -DCMAKE_C_FLAGS_DEBUG="-g -O0"'
|
||||
cmake-target: 'coverage'
|
||||
ccache_max_size: '100G'
|
||||
|
||||
@@ -443,22 +483,26 @@ jobs:
|
||||
- name: Move coverage report
|
||||
if: matrix.job_type == 'coverage'
|
||||
shell: bash
|
||||
env:
|
||||
COVERAGE_FILE: ${{ matrix.coverage_tool == 'llvm' && 'coverage.lcov' || 'coverage.xml' }}
|
||||
run: |
|
||||
mv "${{ env.build_dir }}/coverage.xml" ./
|
||||
mv "${{ env.build_dir }}/${COVERAGE_FILE}" ./
|
||||
echo "COVERAGE_FILE=${COVERAGE_FILE}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Archive coverage report
|
||||
if: matrix.job_type == 'coverage'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage.xml
|
||||
path: coverage.xml
|
||||
name: ${{ env.COVERAGE_FILE }}-${{ matrix.compiler_id }}
|
||||
path: ${{ env.COVERAGE_FILE }}
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload coverage report
|
||||
if: matrix.job_type == 'coverage'
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: coverage.xml
|
||||
files: ${{ env.COVERAGE_FILE }}
|
||||
flags: ${{ matrix.coverage_tool }}
|
||||
fail_ci_if_error: true
|
||||
disable_search: true
|
||||
verbose: true
|
||||
|
||||
@@ -95,16 +95,8 @@ if [[ "$4" == "" ]]; then
|
||||
echo "Non GH, local building, no Action runner magic"
|
||||
else
|
||||
# GH Action, runner
|
||||
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "release" ]]; then
|
||||
echo "building on the release branch... placing it in builds/candidate"
|
||||
mkdir /data/builds/candidate
|
||||
cp /io/release-build/xahaud /data/builds/candidate/$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4
|
||||
cp /io/release-build/release.info /data/builds/candidate/$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4.releaseinfo
|
||||
else
|
||||
echo "building non-release branch, placing it in builds root"
|
||||
cp /io/release-build/xahaud /data/builds/$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4
|
||||
cp /io/release-build/release.info /data/builds/$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4.releaseinfo
|
||||
fi
|
||||
cp /io/release-build/xahaud /data/builds/$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4
|
||||
cp /io/release-build/release.info /data/builds/$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4.releaseinfo
|
||||
echo "Published build to: http://build.xahau.tech/"
|
||||
echo $(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4
|
||||
fi
|
||||
|
||||
156
cmake/CodeCoverageLLVM.cmake
Normal file
156
cmake/CodeCoverageLLVM.cmake
Normal file
@@ -0,0 +1,156 @@
|
||||
#[===================================================================[
|
||||
Native LLVM source-based code coverage helper.
|
||||
|
||||
Drives the -fprofile-instr-generate / -fcoverage-mapping pipeline:
|
||||
1. Run instrumented binary with LLVM_PROFILE_FILE=...%m-%p.profraw
|
||||
2. llvm-profdata merge -sparse -> coverage.profdata
|
||||
3. llvm-cov export/show/report -> final report
|
||||
|
||||
Output filename per coverage_format:
|
||||
lcov -> coverage.lcov
|
||||
json -> coverage.json
|
||||
txt | text -> coverage.txt
|
||||
html | html-details -> <NAME>/index.html
|
||||
#]===================================================================]
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# Locate llvm-profdata / llvm-cov, preferring versioned variants matching the
|
||||
# Clang we're building with so we don't accidentally pair clang-20 with
|
||||
# llvm-cov-14 (profile format mismatch -> hard failure).
|
||||
function(_find_llvm_cov_tools)
|
||||
if(LLVM_PROFDATA_PATH AND LLVM_COV_PATH)
|
||||
return()
|
||||
endif()
|
||||
|
||||
string(REGEX MATCH "^[0-9]+" _major "${CMAKE_CXX_COMPILER_VERSION}")
|
||||
|
||||
set(_pd_names llvm-profdata)
|
||||
set(_cov_names llvm-cov)
|
||||
if(_major)
|
||||
list(PREPEND _pd_names "llvm-profdata-${_major}")
|
||||
list(PREPEND _cov_names "llvm-cov-${_major}")
|
||||
endif()
|
||||
|
||||
# Only delegate to xcrun when the *compiler* is AppleClang. On macOS with
|
||||
# Homebrew/system clang-N, xcrun would resolve to Xcode's llvm tools which
|
||||
# could be a different version - exactly the mismatch we want to avoid.
|
||||
if(APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
execute_process(COMMAND xcrun -f llvm-profdata
|
||||
OUTPUT_VARIABLE _pd_xcrun OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET RESULT_VARIABLE _pd_rc)
|
||||
if(_pd_rc EQUAL 0 AND _pd_xcrun)
|
||||
set(LLVM_PROFDATA_PATH "${_pd_xcrun}" CACHE FILEPATH "llvm-profdata" FORCE)
|
||||
endif()
|
||||
execute_process(COMMAND xcrun -f llvm-cov
|
||||
OUTPUT_VARIABLE _cov_xcrun OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET RESULT_VARIABLE _cov_rc)
|
||||
if(_cov_rc EQUAL 0 AND _cov_xcrun)
|
||||
set(LLVM_COV_PATH "${_cov_xcrun}" CACHE FILEPATH "llvm-cov" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT LLVM_PROFDATA_PATH)
|
||||
find_program(LLVM_PROFDATA_PATH NAMES ${_pd_names})
|
||||
endif()
|
||||
if(NOT LLVM_COV_PATH)
|
||||
find_program(LLVM_COV_PATH NAMES ${_cov_names})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(setup_target_for_coverage_llvm)
|
||||
set(oneValueArgs NAME FORMAT)
|
||||
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
|
||||
cmake_parse_arguments(Cov "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
_find_llvm_cov_tools()
|
||||
if(NOT LLVM_PROFDATA_PATH)
|
||||
message(FATAL_ERROR "llvm-profdata not found (needed for coverage_tool=llvm)")
|
||||
endif()
|
||||
if(NOT LLVM_COV_PATH)
|
||||
message(FATAL_ERROR "llvm-cov not found (needed for coverage_tool=llvm)")
|
||||
endif()
|
||||
|
||||
if(NOT Cov_FORMAT)
|
||||
set(Cov_FORMAT lcov)
|
||||
endif()
|
||||
|
||||
set(_profraw_dir "${PROJECT_BINARY_DIR}/${Cov_NAME}-profraw")
|
||||
set(_profdata "${PROJECT_BINARY_DIR}/${Cov_NAME}.profdata")
|
||||
|
||||
# Resolve binary path: accept either an absolute path or a bare target name
|
||||
# (resolved against PROJECT_BINARY_DIR). Splice the resolved path back into
|
||||
# Cov_EXECUTABLE so the run command invokes it via absolute path - bare
|
||||
# names aren't on PATH and the build dir isn't `.` either.
|
||||
list(GET Cov_EXECUTABLE 0 _exec_name)
|
||||
if(IS_ABSOLUTE "${_exec_name}")
|
||||
set(_binary "${_exec_name}")
|
||||
else()
|
||||
set(_binary "${PROJECT_BINARY_DIR}/${_exec_name}")
|
||||
list(REMOVE_AT Cov_EXECUTABLE 0)
|
||||
list(PREPEND Cov_EXECUTABLE "${_binary}")
|
||||
endif()
|
||||
|
||||
# llvm-cov takes a single -ignore-filename-regex; OR our excludes together.
|
||||
set(_ignore_regex "")
|
||||
foreach(EXC IN LISTS Cov_EXCLUDE)
|
||||
if(_ignore_regex)
|
||||
string(APPEND _ignore_regex "|")
|
||||
endif()
|
||||
string(APPEND _ignore_regex "${EXC}")
|
||||
endforeach()
|
||||
set(_filter "")
|
||||
if(_ignore_regex)
|
||||
set(_filter "-ignore-filename-regex='${_ignore_regex}'")
|
||||
endif()
|
||||
|
||||
# Pick llvm-cov subcommand + output file for the requested format. Each
|
||||
# branch builds a single shell command string that we'll hand to bash -c.
|
||||
if(Cov_FORMAT STREQUAL "lcov")
|
||||
set(_output "${PROJECT_BINARY_DIR}/coverage.lcov")
|
||||
set(_report_sh "${LLVM_COV_PATH} export -instr-profile='${_profdata}' -format=lcov ${_filter} '${_binary}' > '${_output}'")
|
||||
elseif(Cov_FORMAT STREQUAL "json")
|
||||
set(_output "${PROJECT_BINARY_DIR}/coverage.json")
|
||||
set(_report_sh "${LLVM_COV_PATH} export -instr-profile='${_profdata}' -format=text ${_filter} '${_binary}' > '${_output}'")
|
||||
elseif(Cov_FORMAT STREQUAL "txt" OR Cov_FORMAT STREQUAL "text")
|
||||
set(_output "${PROJECT_BINARY_DIR}/coverage.txt")
|
||||
set(_report_sh "${LLVM_COV_PATH} report -instr-profile='${_profdata}' ${_filter} '${_binary}' > '${_output}'")
|
||||
elseif(Cov_FORMAT STREQUAL "html" OR Cov_FORMAT STREQUAL "html-details")
|
||||
set(_output "${PROJECT_BINARY_DIR}/${Cov_NAME}/index.html")
|
||||
set(_report_sh "${LLVM_COV_PATH} show -instr-profile='${_profdata}' -format=html -output-dir='${PROJECT_BINARY_DIR}/${Cov_NAME}' ${_filter} '${_binary}'")
|
||||
else()
|
||||
message(FATAL_ERROR "coverage_tool=llvm: unsupported coverage_format '${Cov_FORMAT}' (use lcov|json|txt|html)")
|
||||
endif()
|
||||
|
||||
set(_merge_sh "${LLVM_PROFDATA_PATH} merge -sparse -o '${_profdata}' '${_profraw_dir}'/*.profraw")
|
||||
|
||||
if(CODE_COVERAGE_VERBOSE)
|
||||
message(STATUS "[coverage:llvm] binary: ${_binary}")
|
||||
message(STATUS "[coverage:llvm] profraw: ${_profraw_dir}")
|
||||
message(STATUS "[coverage:llvm] profdata: ${_profdata}")
|
||||
message(STATUS "[coverage:llvm] format: ${Cov_FORMAT}")
|
||||
message(STATUS "[coverage:llvm] output: ${_output}")
|
||||
if(_ignore_regex)
|
||||
message(STATUS "[coverage:llvm] ignore: ${_ignore_regex}")
|
||||
endif()
|
||||
message(STATUS "[coverage:llvm] merge: ${_merge_sh}")
|
||||
message(STATUS "[coverage:llvm] report: ${_report_sh}")
|
||||
endif()
|
||||
|
||||
# %m: hash of the binary, %p: pid. Wipe the dir up front so stale profraw
|
||||
# files can't leak into a fresh merge.
|
||||
add_custom_target(${Cov_NAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${_profraw_dir}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${_profraw_dir}"
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
"LLVM_PROFILE_FILE=${_profraw_dir}/rippled-%m-%p.profraw"
|
||||
${Cov_EXECUTABLE} ${Cov_EXECUTABLE_ARGS}
|
||||
COMMAND bash -c "${_merge_sh}"
|
||||
COMMAND bash -c "${_report_sh}"
|
||||
BYPRODUCTS ${_output}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
DEPENDS ${Cov_DEPENDENCIES}
|
||||
VERBATIM
|
||||
COMMENT "Running llvm-cov (${Cov_FORMAT}) -> ${_output}"
|
||||
)
|
||||
endfunction()
|
||||
@@ -11,6 +11,21 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(coverage_tool STREQUAL "llvm")
|
||||
include(CodeCoverageLLVM)
|
||||
|
||||
setup_target_for_coverage_llvm(
|
||||
NAME coverage
|
||||
FORMAT ${coverage_format}
|
||||
EXECUTABLE rippled
|
||||
EXECUTABLE_ARGS --unittest$<$<BOOL:${coverage_test}>:=${coverage_test}> --unittest-jobs ${coverage_test_parallelism} --quiet --unittest-log
|
||||
EXCLUDE "src/test" "include/xrpl/beast/test" "include/xrpl/beast/unit_test" "${CMAKE_BINARY_DIR}/pb-xrpl.libpb"
|
||||
DEPENDENCIES rippled
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# coverage_tool == "gcov" (default): existing gcovr-driven pipeline.
|
||||
include(CodeCoverage)
|
||||
|
||||
# The instructions for these commands come from the `CodeCoverage` module,
|
||||
|
||||
@@ -28,15 +28,17 @@ target_compile_options (opts
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<COMPILE_LANGUAGE:CXX>>:-Wsuggest-override>
|
||||
$<$<BOOL:${is_gcc}>:-Wno-maybe-uninitialized>
|
||||
$<$<BOOL:${perf}>:-fno-omit-frame-pointer>
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>>:-g --coverage -fprofile-abs-path>
|
||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>>:-g --coverage>
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>,$<STREQUAL:${coverage_tool},gcov>>:-g --coverage -fprofile-abs-path>
|
||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>,$<STREQUAL:${coverage_tool},gcov>>:-g --coverage>
|
||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>,$<STREQUAL:${coverage_tool},llvm>>:-g -fprofile-instr-generate -fcoverage-mapping>
|
||||
$<$<BOOL:${profile}>:-pg>
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
|
||||
|
||||
target_link_libraries (opts
|
||||
INTERFACE
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>>:-g --coverage -fprofile-abs-path>
|
||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>>:-g --coverage>
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>,$<STREQUAL:${coverage_tool},gcov>>:-g --coverage -fprofile-abs-path>
|
||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>,$<STREQUAL:${coverage_tool},gcov>>:-g --coverage>
|
||||
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>,$<STREQUAL:${coverage_tool},llvm>>:-g -fprofile-instr-generate -fcoverage-mapping>
|
||||
$<$<BOOL:${profile}>:-pg>
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
|
||||
|
||||
|
||||
@@ -29,13 +29,25 @@ if(is_gcc OR is_clang)
|
||||
"Unit tests parallelism for the purpose of coverage report.")
|
||||
set(coverage_format "html-details" CACHE STRING
|
||||
"Output format of the coverage report.")
|
||||
set(coverage_tool "gcov" CACHE STRING
|
||||
"Coverage instrumentation tool: 'gcov' (default, gcc/clang via --coverage + gcovr) or 'llvm' (clang only, native source-based coverage via -fprofile-instr-generate).")
|
||||
set_property(CACHE coverage_tool PROPERTY STRINGS "gcov" "llvm")
|
||||
if(NOT coverage_tool MATCHES "^(gcov|llvm)$")
|
||||
message(FATAL_ERROR "coverage_tool must be 'gcov' or 'llvm', got '${coverage_tool}'")
|
||||
endif()
|
||||
set(coverage_extra_args "" CACHE STRING
|
||||
"Additional arguments to pass to gcovr.")
|
||||
"Additional arguments to pass to gcovr (gcov tool only).")
|
||||
set(coverage_test "" CACHE STRING
|
||||
"On gcc & clang, the specific unit test(s) to run for coverage. Default is all tests.")
|
||||
if(coverage_test AND NOT coverage)
|
||||
set(coverage ON CACHE BOOL "gcc/clang only" FORCE)
|
||||
endif()
|
||||
# Validate after coverage_test may have flipped coverage on, otherwise
|
||||
# `-Dcoverage_tool=llvm -Dcoverage_test=Foo` on gcc would silently slip
|
||||
# past the Clang guard and produce a broken instrumentation combo.
|
||||
if(coverage AND coverage_tool STREQUAL "llvm" AND NOT is_clang)
|
||||
message(FATAL_ERROR "coverage_tool=llvm requires Clang (got ${CMAKE_CXX_COMPILER_ID})")
|
||||
endif()
|
||||
option(wextra "compile with extra gcc/clang warnings enabled" ON)
|
||||
else()
|
||||
set(profile OFF CACHE BOOL "gcc/clang only" FORCE)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#define featureHooksUpdate2 "1"
|
||||
#define fix20250131 "1"
|
||||
#define fixGuardDepth32 "1"
|
||||
#define fixHookMemoryMissing "1"
|
||||
namespace hook_api {
|
||||
struct Rules
|
||||
{
|
||||
@@ -268,7 +267,6 @@ enum hook_log_code : uint16_t {
|
||||
CUSTOM_SECTION_DISALLOWED =
|
||||
86, // the wasm contained a custom section (id=0)
|
||||
INTERNAL_ERROR = 87, // an internal error described by the log text
|
||||
MEMORY_MISSING = 88, // hook wasm did not contain a memory section
|
||||
// RH NOTE: only HookSet msgs got log codes, possibly all Hook log lines
|
||||
// should get a code?
|
||||
};
|
||||
@@ -447,7 +445,6 @@ getImportWhitelist(Rules const& rules)
|
||||
enum GuardRulesVersion : uint64_t {
|
||||
GuardRuleFix20250131 = 0x00000001,
|
||||
GuardRuleDepth32 = 0x00000002,
|
||||
GuardRuleMemoryMissing = 0x00000004,
|
||||
};
|
||||
|
||||
inline uint64_t
|
||||
@@ -458,8 +455,6 @@ getGuardRulesVersion(Rules const& rules)
|
||||
version |= GuardRuleFix20250131;
|
||||
if (rules.enabled(fixGuardDepth32))
|
||||
version |= GuardRuleDepth32;
|
||||
if (rules.enabled(fixHookMemoryMissing))
|
||||
version |= GuardRuleMemoryMissing;
|
||||
return version;
|
||||
}
|
||||
|
||||
|
||||
@@ -893,7 +893,6 @@ validateGuards(
|
||||
int last_import_number = -1;
|
||||
int import_count = 0;
|
||||
int last_section_type = 0;
|
||||
bool has_memory_section = false;
|
||||
for (int i = 8, j = 0; i < wasm.size();)
|
||||
{
|
||||
if (j == i)
|
||||
@@ -1182,24 +1181,11 @@ validateGuards(
|
||||
func_type_map[j] = type_idx;
|
||||
}
|
||||
}
|
||||
else if (section_type == 5) // memory section
|
||||
{
|
||||
has_memory_section = true;
|
||||
}
|
||||
|
||||
i = next_section;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((rulesVersion & hook_api::GuardRuleMemoryMissing) &&
|
||||
!has_memory_section)
|
||||
{
|
||||
GUARDLOG(hook::log::MEMORY_MISSING)
|
||||
<< "Malformed transaction. Hook did not contain a memory section."
|
||||
<< "\n";
|
||||
return {};
|
||||
}
|
||||
|
||||
// we must subtract import_count from the hook and cbak function in order to
|
||||
// be able to look them up in the functions section. this is a rule of the
|
||||
// webassembly spec note that at this point in execution we are guarenteed
|
||||
|
||||
@@ -150,32 +150,23 @@
|
||||
WasmEdge_CallingFrameContext const& frameCtx __VA_OPT__( \
|
||||
COMMA __VA_ARGS__))
|
||||
|
||||
#define HOOK_SETUP() \
|
||||
using enum hook_api::hook_return_code; \
|
||||
try \
|
||||
{ \
|
||||
[[maybe_unused]] ApplyContext& applyCtx = hookCtx.applyCtx; \
|
||||
[[maybe_unused]] auto& view = applyCtx.view(); \
|
||||
[[maybe_unused]] auto j = applyCtx.app.journal("View"); \
|
||||
[[maybe_unused]] WasmEdge_MemoryInstanceContext* memoryCtx = \
|
||||
WasmEdge_CallingFrameGetMemoryInstance(&frameCtx, 0); \
|
||||
if (!memoryCtx) \
|
||||
{ \
|
||||
JLOG(j.warn()) << "HookError[" << HC_ACC() \
|
||||
<< "]: wasm memory is unavailable"; \
|
||||
if (view.rules().enabled(fixHookMemoryMissing)) \
|
||||
{ \
|
||||
hookCtx.result.exitType = hook_api::ExitType::WASM_ERROR; \
|
||||
hookCtx.result.exitReason = ""; \
|
||||
return INTERNAL_ERROR; \
|
||||
} \
|
||||
} \
|
||||
[[maybe_unused]] unsigned char* memory = \
|
||||
WasmEdge_MemoryInstanceGetPointer(memoryCtx, 0, 0); \
|
||||
[[maybe_unused]] const uint64_t memory_length = \
|
||||
WasmEdge_MemoryInstanceGetPageSize(memoryCtx) * \
|
||||
WasmEdge_kPageSize; \
|
||||
[[maybe_unused]] auto& api = hookCtx.api();
|
||||
#define HOOK_SETUP() \
|
||||
using enum hook_api::hook_return_code; \
|
||||
try \
|
||||
{ \
|
||||
[[maybe_unused]] ApplyContext& applyCtx = hookCtx.applyCtx; \
|
||||
[[maybe_unused]] auto& view = applyCtx.view(); \
|
||||
[[maybe_unused]] auto j = applyCtx.app.journal("View"); \
|
||||
[[maybe_unused]] WasmEdge_MemoryInstanceContext* memoryCtx = \
|
||||
WasmEdge_CallingFrameGetMemoryInstance(&frameCtx, 0); \
|
||||
[[maybe_unused]] unsigned char* memory = \
|
||||
WasmEdge_MemoryInstanceGetPointer(memoryCtx, 0, 0); \
|
||||
[[maybe_unused]] const uint64_t memory_length = \
|
||||
WasmEdge_MemoryInstanceGetPageSize(memoryCtx) * \
|
||||
WasmEdge_kPageSize; \
|
||||
[[maybe_unused]] auto& api = hookCtx.api(); \
|
||||
if (!memoryCtx || !memory || !memory_length) \
|
||||
return INTERNAL_ERROR;
|
||||
|
||||
#define HOOK_TEARDOWN() \
|
||||
} \
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
// If you add an amendment here, then do not forget to increment `numFeatures`
|
||||
// in include/xrpl/protocol/Feature.h.
|
||||
|
||||
XRPL_FIX (HookMemoryMissing, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FIX (HookMap, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FIX (GuardDepth32, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(NamedHooks, Supported::yes, VoteBehavior::DefaultNo)
|
||||
|
||||
@@ -3081,100 +3081,6 @@ public:
|
||||
ter(temMALFORMED));
|
||||
}
|
||||
|
||||
void
|
||||
testWasmMissingMemory(FeatureBitset features)
|
||||
{
|
||||
testcase("missing memory");
|
||||
using namespace jtx;
|
||||
|
||||
auto const alice = Account{"alice"};
|
||||
auto const bob = Account{"bob"};
|
||||
auto const carol = Account{"carol"};
|
||||
|
||||
TestHook missing_memory_wasm = wasm[R"[test.hook](
|
||||
(module
|
||||
(type $rollback_type
|
||||
(func (param i32 i32 i64) (result i64)))
|
||||
(type $guard_type (func (param i32 i32) (result i32)))
|
||||
(type $hook_type (func (param i32) (result i64)))
|
||||
(import "env" "rollback"
|
||||
(func $rollback (type $rollback_type)))
|
||||
(import "env" "_g" (func $_g (type $guard_type)))
|
||||
(func $hook (type $hook_type) (param i32) (result i64)
|
||||
i32.const 1
|
||||
i32.const 1
|
||||
i64.const 0
|
||||
call $rollback
|
||||
drop
|
||||
i32.const 1
|
||||
i32.const 1
|
||||
call $_g
|
||||
drop
|
||||
i64.const 0)
|
||||
(export "hook" (func $hook)))
|
||||
)[test.hook]"];
|
||||
|
||||
for (auto const& withFix : {false, true})
|
||||
{
|
||||
// test if the Hook is created before the Amendment is enabled
|
||||
Env env{*this, features - fixHookMemoryMissing};
|
||||
env.fund(XRP(10000), alice, bob, carol);
|
||||
|
||||
env(ripple::test::jtx::hook(alice, {{hso(missing_memory_wasm)}}, 0),
|
||||
M("Install missing memory hook"),
|
||||
HSFEE);
|
||||
env.close();
|
||||
|
||||
if (withFix)
|
||||
{
|
||||
env.enableFeature(fixHookMemoryMissing);
|
||||
env.close();
|
||||
}
|
||||
|
||||
env(pay(bob, alice, XRP(1)),
|
||||
M("Test missing memory hook"),
|
||||
fee(XRP(1)),
|
||||
ter(tecHOOK_REJECTED));
|
||||
|
||||
auto meta = env.meta();
|
||||
BEAST_REQUIRE(meta);
|
||||
BEAST_REQUIRE(meta->isFieldPresent(sfHookExecutions));
|
||||
|
||||
auto const& hookExecutions = meta->getFieldArray(sfHookExecutions);
|
||||
BEAST_REQUIRE(hookExecutions.size() == 1);
|
||||
auto const& e = hookExecutions[0];
|
||||
|
||||
auto const expectedExitType = withFix
|
||||
? hook_api::ExitType::WASM_ERROR
|
||||
: hook_api::ExitType::UNSET;
|
||||
BEAST_EXPECT(
|
||||
e.getFieldU8(sfHookResult) ==
|
||||
static_cast<uint8_t>(expectedExitType));
|
||||
BEAST_EXPECT(e.getFieldVL(sfHookReturnString).size() == 0);
|
||||
BEAST_EXPECT(
|
||||
e.getFieldU64(sfHookReturnCode) ==
|
||||
0x8000000000000001 /* INTERNAL_ERROR */);
|
||||
}
|
||||
|
||||
for (auto const& withFix : {false, true})
|
||||
{
|
||||
// test if the Hook is created after the Amendment is enabled
|
||||
auto f = features - fixHookMemoryMissing;
|
||||
if (withFix)
|
||||
f = f | fixHookMemoryMissing;
|
||||
Env env{*this, f};
|
||||
env.fund(XRP(10000), alice, bob, carol);
|
||||
|
||||
auto const expectedTer =
|
||||
withFix ? TER{temMALFORMED} : TER{tesSUCCESS};
|
||||
env(ripple::test::jtx::hook(alice, {{hso(missing_memory_wasm)}}, 0),
|
||||
M("Install missing memory hook"),
|
||||
HSFEE,
|
||||
ter(expectedTer));
|
||||
env.close();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
test_accept(FeatureBitset features)
|
||||
{
|
||||
@@ -15171,8 +15077,6 @@ public:
|
||||
void
|
||||
testWithFeatures(FeatureBitset features)
|
||||
{
|
||||
testWasmMissingMemory(features);
|
||||
return;
|
||||
testHooksOwnerDir(features);
|
||||
testHooksDisabled(features);
|
||||
testTxStructure(features);
|
||||
@@ -15199,7 +15103,6 @@ public:
|
||||
testFillCopy(features);
|
||||
|
||||
testWasm(features);
|
||||
testWasmMissingMemory(features);
|
||||
test_accept(features);
|
||||
test_rollback(features);
|
||||
|
||||
|
||||
@@ -191,42 +191,6 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
}},
|
||||
|
||||
/* ==== WASM: 1 ==== */
|
||||
{R"[test.hook](
|
||||
(module
|
||||
(type $rollback_type
|
||||
(func (param i32 i32 i64) (result i64)))
|
||||
(type $guard_type (func (param i32 i32) (result i32)))
|
||||
(type $hook_type (func (param i32) (result i64)))
|
||||
(import "env" "rollback"
|
||||
(func $rollback (type $rollback_type)))
|
||||
(import "env" "_g" (func $_g (type $guard_type)))
|
||||
(func $hook (type $hook_type) (param i32) (result i64)
|
||||
i32.const 1
|
||||
i32.const 1
|
||||
i64.const 0
|
||||
call $rollback
|
||||
drop
|
||||
i32.const 1
|
||||
i32.const 1
|
||||
call $_g
|
||||
drop
|
||||
i64.const 0)
|
||||
(export "hook" (func $hook)))
|
||||
)[test.hook]",
|
||||
{
|
||||
0x00U, 0x61U, 0x73U, 0x6DU, 0x01U, 0x00U, 0x00U, 0x00U, 0x01U, 0x13U,
|
||||
0x03U, 0x60U, 0x03U, 0x7FU, 0x7FU, 0x7EU, 0x01U, 0x7EU, 0x60U, 0x02U,
|
||||
0x7FU, 0x7FU, 0x01U, 0x7FU, 0x60U, 0x01U, 0x7FU, 0x01U, 0x7EU, 0x02U,
|
||||
0x19U, 0x02U, 0x03U, 0x65U, 0x6EU, 0x76U, 0x08U, 0x72U, 0x6FU, 0x6CU,
|
||||
0x6CU, 0x62U, 0x61U, 0x63U, 0x6BU, 0x00U, 0x00U, 0x03U, 0x65U, 0x6EU,
|
||||
0x76U, 0x02U, 0x5FU, 0x67U, 0x00U, 0x01U, 0x03U, 0x02U, 0x01U, 0x02U,
|
||||
0x07U, 0x08U, 0x01U, 0x04U, 0x68U, 0x6FU, 0x6FU, 0x6BU, 0x00U, 0x02U,
|
||||
0x0AU, 0x16U, 0x01U, 0x14U, 0x00U, 0x41U, 0x01U, 0x41U, 0x01U, 0x42U,
|
||||
0x00U, 0x10U, 0x00U, 0x1AU, 0x41U, 0x01U, 0x41U, 0x01U, 0x10U, 0x01U,
|
||||
0x1AU, 0x42U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 2 ==== */
|
||||
{R"[test.hook](
|
||||
(module
|
||||
(type (;0;) (func (param i32 i32) (result i64)))
|
||||
@@ -276,7 +240,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 3 ==== */
|
||||
/* ==== WASM: 2 ==== */
|
||||
{R"[test.hook](
|
||||
(module
|
||||
(type (;0;) (func (param i32 i32) (result i64)))
|
||||
@@ -330,7 +294,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x14U, 0x10U, 0x00U, 0x1AU, 0x0CU, 0x00U, 0x0BU, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 4 ==== */
|
||||
/* ==== WASM: 3 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -397,7 +361,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x80U, 0x80U, 0x00U, 0x20U, 0x02U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 5 ==== */
|
||||
/* ==== WASM: 4 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -503,7 +467,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x6AU, 0x24U, 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x20U, 0x03U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 6 ==== */
|
||||
/* ==== WASM: 5 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -578,7 +542,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x6AU, 0x24U, 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x20U, 0x05U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 7 ==== */
|
||||
/* ==== WASM: 6 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g(uint32_t, uint32_t);
|
||||
@@ -1195,7 +1159,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x78U, 0x29U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 8 ==== */
|
||||
/* ==== WASM: 7 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g(uint32_t, uint32_t);
|
||||
@@ -1624,7 +1588,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 9 ==== */
|
||||
/* ==== WASM: 8 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -1830,7 +1794,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x3DU, 0x20U, 0x30U, 0x78U, 0x45U, 0x31U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 10 ==== */
|
||||
/* ==== WASM: 9 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -1952,7 +1916,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x58U, 0x4EU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 11 ==== */
|
||||
/* ==== WASM: 10 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -2085,7 +2049,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x4FU, 0x4EU, 0x43U, 0x45U, 0x53U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 12 ==== */
|
||||
/* ==== WASM: 11 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -2165,7 +2129,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x54U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 13 ==== */
|
||||
/* ==== WASM: 12 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -2210,7 +2174,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 14 ==== */
|
||||
/* ==== WASM: 13 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -2529,7 +2493,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x80U, 0x80U, 0x80U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 15 ==== */
|
||||
/* ==== WASM: 14 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -3315,7 +3279,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x37U, 0x36U, 0x33U, 0x4CU, 0x4CU, 0x20U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 16 ==== */
|
||||
/* ==== WASM: 15 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -3705,7 +3669,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x80U, 0x80U, 0x80U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 17 ==== */
|
||||
/* ==== WASM: 16 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -3886,7 +3850,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x38U, 0x4CU, 0x4CU, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 18 ==== */
|
||||
/* ==== WASM: 17 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -4075,7 +4039,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 19 ==== */
|
||||
/* ==== WASM: 18 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -4314,7 +4278,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U, 0x42U, 0x00U, 0x10U, 0x85U, 0x80U, 0x80U, 0x80U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 20 ==== */
|
||||
/* ==== WASM: 19 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -5016,7 +4980,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x38U, 0x35U, 0x35U, 0x32U, 0x55U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 21 ==== */
|
||||
/* ==== WASM: 20 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -6361,7 +6325,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 22 ==== */
|
||||
/* ==== WASM: 21 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -6463,7 +6427,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x84U, 0x80U, 0x80U, 0x80U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 23 ==== */
|
||||
/* ==== WASM: 22 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -6506,7 +6470,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 24 ==== */
|
||||
/* ==== WASM: 23 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -6654,7 +6618,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x34U, 0x34U, 0x4CU, 0x4CU, 0x2CU, 0x20U, 0x33U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 25 ==== */
|
||||
/* ==== WASM: 24 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -6982,7 +6946,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x38U, 0x34U, 0x39U, 0x30U, 0x4CU, 0x4CU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 26 ==== */
|
||||
/* ==== WASM: 25 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -7187,7 +7151,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x10U, 0x85U, 0x80U, 0x80U, 0x80U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 27 ==== */
|
||||
/* ==== WASM: 26 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -7871,7 +7835,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x3DU, 0x3DU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 28 ==== */
|
||||
/* ==== WASM: 27 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -8166,7 +8130,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x32U, 0x34U, 0x31U, 0x36U, 0x55U, 0x4CU, 0x4CU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 29 ==== */
|
||||
/* ==== WASM: 28 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -8879,7 +8843,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x31U, 0x33U, 0x33U, 0x38U, 0x20U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 30 ==== */
|
||||
/* ==== WASM: 29 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -8964,7 +8928,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x30U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x32U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 31 ==== */
|
||||
/* ==== WASM: 30 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9026,7 +8990,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x80U, 0x80U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 32 ==== */
|
||||
/* ==== WASM: 31 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9103,7 +9067,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x31U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 33 ==== */
|
||||
/* ==== WASM: 32 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9180,7 +9144,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x31U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 34 ==== */
|
||||
/* ==== WASM: 33 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9437,7 +9401,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 35 ==== */
|
||||
/* ==== WASM: 34 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9595,7 +9559,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x04U, 0x00U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 36 ==== */
|
||||
/* ==== WASM: 35 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9948,7 +9912,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U, 0x2AU, 0x04U, 0x00U, 0x00U, 0x31U, 0x04U, 0x00U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 37 ==== */
|
||||
/* ==== WASM: 36 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -9981,7 +9945,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x82U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, 0x20U, 0x01U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 38 ==== */
|
||||
/* ==== WASM: 37 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10208,7 +10172,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 39 ==== */
|
||||
/* ==== WASM: 38 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10239,7 +10203,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x80U, 0x80U, 0x00U, 0x1AU, 0x20U, 0x01U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 40 ==== */
|
||||
/* ==== WASM: 39 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10550,7 +10514,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 41 ==== */
|
||||
/* ==== WASM: 40 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10627,7 +10591,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 42 ==== */
|
||||
/* ==== WASM: 41 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10661,7 +10625,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x80U, 0x80U, 0x00U, 0x1AU, 0x20U, 0x01U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 43 ==== */
|
||||
/* ==== WASM: 42 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10748,7 +10712,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 44 ==== */
|
||||
/* ==== WASM: 43 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10782,7 +10746,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 45 ==== */
|
||||
/* ==== WASM: 44 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -10922,7 +10886,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x54U, 0x5FU, 0x4DU, 0x45U, 0x54U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 46 ==== */
|
||||
/* ==== WASM: 45 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -11112,7 +11076,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x31U, 0x34U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 47 ==== */
|
||||
/* ==== WASM: 46 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -11266,7 +11230,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 48 ==== */
|
||||
/* ==== WASM: 47 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -11427,7 +11391,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 49 ==== */
|
||||
/* ==== WASM: 48 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -11584,7 +11548,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x53U, 0x4CU, 0x4FU, 0x54U, 0x53U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 50 ==== */
|
||||
/* ==== WASM: 49 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -11669,7 +11633,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x74U, 0x79U, 0x70U, 0x65U, 0x28U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 51 ==== */
|
||||
/* ==== WASM: 50 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -11926,7 +11890,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 52 ==== */
|
||||
/* ==== WASM: 51 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -12164,7 +12128,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x3EU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 53 ==== */
|
||||
/* ==== WASM: 52 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -12260,7 +12224,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x53U, 0x54U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 54 ==== */
|
||||
/* ==== WASM: 53 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -12370,7 +12334,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x31U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 55 ==== */
|
||||
/* ==== WASM: 54 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -12500,7 +12464,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x30U, 0x30U, 0x30U, 0x4CU, 0x4CU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 56 ==== */
|
||||
/* ==== WASM: 55 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -12774,7 +12738,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 57 ==== */
|
||||
/* ==== WASM: 56 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -12911,7 +12875,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x2CU, 0x20U, 0x73U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x31U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 58 ==== */
|
||||
/* ==== WASM: 57 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -13205,7 +13169,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x5FU, 0x53U, 0x4CU, 0x4FU, 0x54U, 0x53U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 59 ==== */
|
||||
/* ==== WASM: 58 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -13439,7 +13403,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x5FU, 0x53U, 0x4CU, 0x4FU, 0x54U, 0x53U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 60 ==== */
|
||||
/* ==== WASM: 59 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -13735,7 +13699,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x2CU, 0x20U, 0x31U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 61 ==== */
|
||||
/* ==== WASM: 60 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -13939,7 +13903,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x6EU, 0x74U, 0x32U, 0x22U, 0x20U, 0x2BU, 0x20U, 0x69U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 62 ==== */
|
||||
/* ==== WASM: 61 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -14056,7 +14020,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x69U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 63 ==== */
|
||||
/* ==== WASM: 62 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -14165,7 +14129,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x6EU, 0x74U, 0x65U, 0x6EU, 0x74U, 0x32U, 0x22U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 64 ==== */
|
||||
/* ==== WASM: 63 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -14438,7 +14402,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 65 ==== */
|
||||
/* ==== WASM: 64 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
#define sfInvoiceID ((5U << 16U) + 17U)
|
||||
@@ -14657,7 +14621,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x30U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 66 ==== */
|
||||
/* ==== WASM: 65 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -14769,7 +14733,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x58U, 0x49U, 0x53U, 0x54U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 67 ==== */
|
||||
/* ==== WASM: 66 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
#define sfInvoiceID ((5U << 16U) + 17U)
|
||||
@@ -14905,7 +14869,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x3DU, 0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 68 ==== */
|
||||
/* ==== WASM: 67 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15041,7 +15005,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x49U, 0x47U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 69 ==== */
|
||||
/* ==== WASM: 68 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15180,7 +15144,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x66U, 0x28U, 0x64U, 0x61U, 0x74U, 0x61U, 0x32U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 70 ==== */
|
||||
/* ==== WASM: 69 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15292,7 +15256,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 71 ==== */
|
||||
/* ==== WASM: 70 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15386,7 +15350,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x61U, 0x64U, 0x5BU, 0x69U, 0x5DU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 72 ==== */
|
||||
/* ==== WASM: 71 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15519,7 +15483,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x64U, 0x5BU, 0x69U, 0x5DU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 73 ==== */
|
||||
/* ==== WASM: 72 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15607,7 +15571,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x61U, 0x74U, 0x61U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 74 ==== */
|
||||
/* ==== WASM: 73 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
#define sfInvoiceID ((5U << 16U) + 17U)
|
||||
@@ -15718,7 +15682,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x33U, 0x32U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 75 ==== */
|
||||
/* ==== WASM: 74 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -15929,7 +15893,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 76 ==== */
|
||||
/* ==== WASM: 75 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -16037,7 +16001,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x22U, 0x32U, 0x22U, 0x2CU, 0x20U, 0x31U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 77 ==== */
|
||||
/* ==== WASM: 76 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -16649,7 +16613,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 78 ==== */
|
||||
/* ==== WASM: 77 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -16836,7 +16800,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x63U, 0x65U, 0x29U, 0x20U, 0x3EU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 79 ==== */
|
||||
/* ==== WASM: 78 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17186,7 +17150,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 80 ==== */
|
||||
/* ==== WASM: 79 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17322,7 +17286,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 81 ==== */
|
||||
/* ==== WASM: 80 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17381,7 +17345,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x64U, 0xE1U, 0xF1U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 82 ==== */
|
||||
/* ==== WASM: 81 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17554,7 +17518,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x54U, 0x5FU, 0x45U, 0x58U, 0x49U, 0x53U, 0x54U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 83 ==== */
|
||||
/* ==== WASM: 82 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17702,7 +17666,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x30U, 0x00U, 0x22U, 0x00U, 0x00U, 0x00U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 84 ==== */
|
||||
/* ==== WASM: 83 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17856,7 +17820,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x0FU, 0x0BU, 0x02U, 0x56U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 85 ==== */
|
||||
/* ==== WASM: 84 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -17953,7 +17917,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x3DU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 86 ==== */
|
||||
/* ==== WASM: 85 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -18012,7 +17976,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x4FU, 0x46U, 0x5FU, 0x42U, 0x4FU, 0x55U, 0x4EU, 0x44U, 0x53U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 87 ==== */
|
||||
/* ==== WASM: 86 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -18071,7 +18035,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x4EU, 0x44U, 0x53U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 88 ==== */
|
||||
/* ==== WASM: 87 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -19900,7 +19864,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x53U, 0x4DU, 0x41U, 0x4CU, 0x4CU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 89 ==== */
|
||||
/* ==== WASM: 88 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -21519,7 +21483,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x29U, 0x29U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 90 ==== */
|
||||
/* ==== WASM: 89 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -24452,7 +24416,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x4FU, 0x4FU, 0x5FU, 0x53U, 0x4DU, 0x41U, 0x4CU, 0x4CU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 91 ==== */
|
||||
/* ==== WASM: 90 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -26417,7 +26381,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x54U, 0x4FU, 0x4FU, 0x5FU, 0x53U, 0x4DU, 0x41U, 0x4CU, 0x4CU, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 92 ==== */
|
||||
/* ==== WASM: 91 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -26702,7 +26666,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x30U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 93 ==== */
|
||||
/* ==== WASM: 92 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g(uint32_t, uint32_t);
|
||||
@@ -27289,7 +27253,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x4EU, 0x5FU, 0x46U, 0x41U, 0x49U, 0x4CU, 0x55U, 0x52U, 0x45U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 94 ==== */
|
||||
/* ==== WASM: 93 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -27318,7 +27282,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 95 ==== */
|
||||
/* ==== WASM: 94 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -27350,7 +27314,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x20U, 0x52U, 0x65U, 0x6AU, 0x65U, 0x63U, 0x74U, 0x65U, 0x64U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 96 ==== */
|
||||
/* ==== WASM: 95 ==== */
|
||||
{R"[test.hook](
|
||||
(module
|
||||
(type (;0;) (func (param i32 i32 i64) (result i64)))
|
||||
@@ -27377,7 +27341,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x41U, 0x00U, 0x41U, 0x00U, 0x42U, 0x00U, 0x10U, 0x00U, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 97 ==== */
|
||||
/* ==== WASM: 96 ==== */
|
||||
{R"[test.hook](
|
||||
(module
|
||||
(type (;0;) (func (param i32 i32) (result i32)))
|
||||
@@ -27430,7 +27394,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x00U, 0x1AU, 0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 98 ==== */
|
||||
/* ==== WASM: 97 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -34073,7 +34037,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x39U, 0x30U, 0x31U, 0x32U, 0x33U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 99 ==== */
|
||||
/* ==== WASM: 98 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -34119,7 +34083,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x0BU, 0x06U, 0x76U, 0x61U, 0x6CU, 0x75U, 0x65U, 0x00U,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 100 ==== */
|
||||
/* ==== WASM: 99 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int32_t _g (uint32_t id, uint32_t maxiter);
|
||||
@@ -34148,7 +34112,7 @@ std::map<std::string, std::vector<uint8_t>> wasm = {
|
||||
0x0BU,
|
||||
}},
|
||||
|
||||
/* ==== WASM: 101 ==== */
|
||||
/* ==== WASM: 100 ==== */
|
||||
{R"[test.hook](
|
||||
#include <stdint.h>
|
||||
extern int64_t accept (uint32_t read_ptr, uint32_t read_len, int64_t error_code);
|
||||
|
||||
Reference in New Issue
Block a user