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

Fix oss-fuzz build #2869

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Fix oss-fuzz build #2869

merged 1 commit into from
Apr 21, 2021

Conversation

dqminh
Copy link
Contributor

@dqminh dqminh commented Mar 23, 2021

THis fixes incorrect module path and also add proper tags for
FuzzUIDMap.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32109#c1

Signed-off-by: Daniel Dao dqminh89@gmail.com

THis fixes incorrect module path and also add proper tags for
FuzzUIDMap.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32109#c1

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
@kolyshkin
Copy link
Contributor

@AdamKorcz PTAL

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM, and thanks!

compile_go_fuzzer ./libcontainer/system FuzzUIDMap id_map_fuzzer linux
compile_go_fuzzer ./libcontainer/user FuzzUser user_fuzzer
compile_go_fuzzer ./libcontainer/configs FuzzUnmarshalJSON configs_fuzzer
compile_go_fuzzer github.com/opencontainers/runc/libcontainer/system FuzzUIDMap id_map_fuzzer linux,gofuzz
Copy link
Contributor

Choose a reason for hiding this comment

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

The linux tag is probably redundant -- as long as fuzzing is done on Linux.

Copy link
Contributor

Choose a reason for hiding this comment

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

OSS-fuzz only fuzz on Linux.

Copy link
Contributor

Choose a reason for hiding this comment

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

OSS-fuzz only fuzz on Linux.

This means that the linux tag is there implicitly (set by the platform), and so it is redundant.

Copy link
Contributor

Choose a reason for hiding this comment

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

Anyway, this can be addressed separately

@AdamKorcz
Copy link
Contributor

AdamKorcz commented Mar 23, 2021

@dqminh Thank you for fixing this!

The broken build is the coverage build. To test that build specifically locally you need to run:
infra/helper.py build_fuzzers --sanitizer=coverage runc

The specific part of the documentation is here: https://google.github.io/oss-fuzz/advanced-topics/code-coverage/#build-fuzz-targets

When I test the updated build file locally I get the error:
./fuzzuser_test.go:56:3: undefined: FuzzUser

Could you tell me if this was tested with the --sanitizer=coverage?

@AdamKorcz
Copy link
Contributor

I tested this one again, and it works fine with both address sanitizer and coverage sanitizer which is exactly what we need.

My previous test might have been with an OSS-fuzz image that was not the latest.

LGTM

@kolyshkin
Copy link
Contributor

close/reopen to kick the latest ci

@kolyshkin kolyshkin closed this Apr 15, 2021
@kolyshkin kolyshkin reopened this Apr 15, 2021
@kolyshkin
Copy link
Contributor

@AkihiroSuda PTAL

@mrunalp mrunalp merged commit b69bd53 into opencontainers:master Apr 21, 2021
@dqminh dqminh deleted the fix-oss-fuzz branch April 21, 2021 12:42
@dqminh
Copy link
Contributor Author

dqminh commented Apr 21, 2021

Build was fixed in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32109#c6 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants