Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wasm-mutator-fuzz test #3420

Merged
merged 5 commits into from May 21, 2024
Merged

Add wasm-mutator-fuzz test #3420

merged 5 commits into from May 21, 2024

Conversation

yzha107
Copy link
Contributor

@yzha107 yzha107 commented May 13, 2024

No description provided.

@lum1n0us
Copy link
Collaborator

Hope #3428 can fix failures.

-fprofile-instr-generate -fcoverage-mapping \
-fsanitize=address,undefined,fuzzer")

include(${REPO_ROOT_DIR}/wamr/core/shared/utils/uncommon/shared_uncommon.cmake)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
include(${REPO_ROOT_DIR}/wamr/core/shared/utils/uncommon/shared_uncommon.cmake)
include(${REPO_ROOT_DIR}/core/shared/utils/uncommon/shared_uncommon.cmake)

-fsanitize=address,undefined,fuzzer")

include(${REPO_ROOT_DIR}/wamr/core/shared/utils/uncommon/shared_uncommon.cmake)
include(${REPO_ROOT_DIR}/wamr/build-scripts/runtime_lib.cmake)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
include(${REPO_ROOT_DIR}/wamr/build-scripts/runtime_lib.cmake)
include(${REPO_ROOT_DIR}/build-scripts/runtime_lib.cmake)

@lum1n0us
Copy link
Collaborator

Maybe just mine, but still, please be awarded of my compilation error

# use default configuration
$ cmake -S . -B build

$ cmake --build build
...
wasm_mutator_fuzz.cc:33:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~

@yzha107
Copy link
Contributor Author

yzha107 commented May 14, 2024

Maybe just mine, but still, please be awarded of my compilation error

# use default configuration
$ cmake -S . -B build

$ cmake --build build
...
wasm_mutator_fuzz.cc:33:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~

Let me take a try. I also encountered an issue of running wasm mutator server.

@lum1n0us
Copy link
Collaborator

Maybe just mine, but still, please be awarded of my compilation error

# use default configuration
$ cmake -S . -B build

$ cmake --build build
...
wasm_mutator_fuzz.cc:33:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~

fixed by apt install libstdc++-12-dev


for((i=1; i<($@+1); i++));
do
head -c 100 /dev/urandom | wasm-tools smith -o test_$i.wasm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here. wasm-tools smith only generates simplest .wasm. Do u think we should use other smith options, like --bulk-memory-enabled, --exceptions-enabled, --gc-enabled, to make generations more complex?

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,133 @@
// Copyright (C) 2019 Intel Corporation. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is duplicated with wasm_mutator_fuzz.cc in parent folder, do we need to keep both files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one in workspace is for docker building, the one in /wasm-mutator-fuzz is for manually build.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, Thanks~

Copy link
Collaborator

@xujuntwt95329 xujuntwt95329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit a2f3c72 into bytecodealliance:main May 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants