Skip to content

Can't fuzz after updating. #106

@dpc

Description

@dpc

I'm trying to update our toolchains, and honggfuzz couldn't compile due to some C++ nonsense:

  mangle.c:419:6: error: initializer-string for character array is too long, array size is 8 but initializer has size 9 (including the null terminating charact
er); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
    419 |     {"\x00\x00\x00\x00\x00\x00\x00\x07", 8},
        |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

because "C++ is sooo stable and mature" that stuff in C++ has only 25% chance of compiling after updating toolchain - I'm used to it now. But anyway, that is not the issue I'm reporting - it only caused me to try to update honggfuzz + cargo-fuzz. And now I'm getting:

  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /nix/store/416ykpc2bksb90sd1ia8cybxb3p83mrd-binutils-2.44/bin/ld: /home/dpc/lab/fedimint/fedimint/hfuzz_target/x86_64-unknown-linux-gnu/release/deps/
librand-9c0b8cf3b9110dc8.rlib(rand-9c0b8cf3b9110dc8.rand.12a78ba78620fe8b-cgu.1.rcgu.o): in function `core::fmt::Write::write_char':
          rand.12a78ba78620fe8b-cgu.1:(.text._ZN4core3fmt5Write10write_char17h3c15b5565e32a64bE[_ZN4core3fmt5Write10write_char17h3c15b5565e32a64bE]+0x121): und
efined reference to `std::io::Write::write_all'
          /nix/store/416ykpc2bksb90sd1ia8cybxb3p83mrd-binutils-2.44/bin/ld: /home/dpc/lab/fedimint/fedimint/hfuzz_target/x86_64-unknown-linux-gnu/release/deps/
librand-9c0b8cf3b9110dc8.rlib(rand-9c0b8cf3b9110dc8.rand.12a78ba78620fe8b-cgu.1.rcgu.o): in function `<std::io::default_write_fmt::Adapter<T> as core::fmt::Wri
te>::write_str':
          rand.12a78ba78620fe8b-cgu.1:(.text._ZN81_$LT$std..io..default_write_fmt..Adapter$LT$T$GT$$u20$as$u20$core..fmt..Write$GT$9write_str17h47f068068812540
eE[_ZN81_$LT$std..io..default_write_fmt..Adapter$LT$T$GT$$u20$as$u20$core..fmt..Write$GT$9write_str17h47f068068812540eE]+0x24): undefined reference to `std::io
::Write::write_all'
          /nix/store/416ykpc2bksb90sd1ia8cybxb3p83mrd-binutils-2.44/bin/ld: /home/dpc/lab/fedimint/fedimint/hfuzz_target/x86_64-unknown-linux-gnu/release/deps/
libiroh_base-61a06741392e63f9.rlib(iroh_base-61a06741392e63f9.iroh_base.f113db48b0af61e8-cgu.12.rcgu.o): in function `<alloc::string::String as core::fmt::Writ
e>::write_char':
          iroh_base.f113db48b0af61e8-cgu.12:(.text._ZN58_$LT$alloc..string..String$u20$as$u20$core..fmt..Write$GT$10write_char17hdcc0152c62e4d6faE[_ZN58_$LT$al
loc..string..String$u20$as$u20$core..fmt..Write$GT$10write_char17hdcc0152c62e4d6faE]+0xb5): undefined reference to `alloc::vec::Vec<T,A>::reserve'
          /nix/store/416ykpc2bksb90sd1ia8cybxb3p83mrd-binutils-2.44/bin/ld: /home/dpc/lab/fedimint/fedimint/hfuzz_target/x86_64-unknown-linux-gnu/release/deps/
libiroh_relay-f6b07a480904a283.so: hidden symbol `_ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17h750e5744f5b892dcE' isn't defined
          /nix/store/416ykpc2bksb90sd1ia8cybxb3p83mrd-binutils-2.44/bin/ld: final link failed: bad value
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

and I have no idea what to do about it. I tried multiple clang versions provided by Nix, I tried Rust 1.89 and 1.91. I I tried various honggfuzz versions and either they hit the original C++ compilation issue (IIRC 0.5.55 and 0.5.56) or the new Rust toolchain one (0.5.57 and 0.5.58). I tried to disable LTO in release profile as I've googled some similar issues like that. I would appreciate any ideas how to fix it. Everything else (whole extensive CI and linting, compilation, xcompilation, etc.) seems to be working, but I'm blocked on fuzzing being broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions