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

afl: fix afl-clang-fast++ by making it a copy of afl-clang-fast, not a symlink #85520

Merged
merged 1 commit into from Apr 25, 2020

Conversation

risicle
Copy link
Contributor

@risicle risicle commented Apr 18, 2020

Motivation for this change

wrapProgram seems to perform some sort of realpath check and ends up wrapping the symlink's target directly, skipping afl-clang-fast++ entirely. Unfortunately, nix's cc wrapper relies on inspecting argv[0] as part of its cpp-mode detection, and will switch back to c mode if it can't find a ++.

Ultimately it would be nice to have the option to disable this realpath check of wrapProgram, but for now the penalty is just a small addition to the on-disk size of the package.

cc @thoughtpolice

Anyone interested in this package might also consider approving #76645 which I've just updated similarly. aflplusplus is better and more maintainable (has tests!).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

…a symlink

a symlink gets skipped by wrapProgram and this ends up confusing the nix
cc wrapper's cpp mode detection
@risicle
Copy link
Contributor Author

risicle commented Apr 18, 2020

@GrahamcOfBorg build afl

@thoughtpolice thoughtpolice merged commit 1985c6b into NixOS:master Apr 25, 2020
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.

None yet

2 participants