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

package libunwind and libblocksruntime with honggfuzz #188

Open
zhenyudg opened this issue Dec 11, 2021 · 6 comments
Open

package libunwind and libblocksruntime with honggfuzz #188

zhenyudg opened this issue Dec 11, 2021 · 6 comments
Labels
code health Cleanup or testing task that improves the codebase priority:low The issue is low priority for the milestone.

Comments

@zhenyudg
Copy link
Contributor

Currently, using honggfuzz + rules_fuzzing requires users to install libunwind-dev and libblocksruntime-dev. Users might also need to configure their bazel toolchains to support these dependencies.

I would prefer to see these dependencies packaged with rules_fuzzing, so that honggfuzz would build more hermetically. Preferably we could bazelify and build these dependencies from source; alternatively we can supply binaries.

@zhenyudg zhenyudg changed the title Package libunwind and libblocksruntime with honggfuzz Feature request: package libunwind and libblocksruntime with honggfuzz Dec 11, 2021
@stefanbucur
Copy link
Collaborator

How big of an issue is this in practice? I'm happy to consider alternative designs, but I would like to understand what are the pros/cons of each, especially in terms of complexity added to the codebase.

@stefanbucur stefanbucur added code health Cleanup or testing task that improves the codebase priority:low The issue is low priority for the milestone. labels Dec 13, 2021
@fmeum
Copy link
Member

fmeum commented Dec 13, 2021

Speaking to the cons: libblocksruntime consists of two source files and two headers with a very simple Makefile. There is already a Google-provided BUILD file for libunwind here, which could likely be reused with a few modifications (mostly deletions). These could potentially be upstreamed to the Bazel Central Registry as they should be generically useful for other Bazel projects, which could help with maintenance.

@zhenyudg
Copy link
Contributor Author

zhenyudg commented Dec 13, 2021

How big of an issue is this in practice?

A change in my organization's Bazel toolchain setup broke compatibility and meant we couldn't fuzz until I figured out how toolchains worked and fixed the regression; edit: I ended up adding the dependencies' binaries to a patched version of rules_fuzzing to make the build hermetic instead of working with toolchains.

@stefanbucur
Copy link
Collaborator

Supplying binaries would be restrictive, since they may not work on all platforms. If we provide BUILD rules for libunwind-dev and libblocksruntime-dev, are there other (transitive) dependencies that would need to be installed instead?

@zhenyudg
Copy link
Contributor Author

libblocksruntime shouldn't have transitive dependencies. libunwind might need implementations of certain functions on some architectures, but running libunwind on x86_64 shouldn't need transitive dependencies.

@stefanbucur
Copy link
Collaborator

Thanks for this extra context. In this case, I'd be happy to review a PR that adds the missing build rules for these two libraries.

@zhenyudg zhenyudg changed the title Feature request: package libunwind and libblocksruntime with honggfuzz package libunwind and libblocksruntime with honggfuzz Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Cleanup or testing task that improves the codebase priority:low The issue is low priority for the milestone.
Projects
None yet
Development

No branches or pull requests

3 participants