stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
125 stars 67 forks source link

Fuzzing broken #1355

Closed leighmcculloch closed 3 weeks ago

leighmcculloch commented 1 month ago

Recently I've been unable to build cargo fuzz targets that import a contract.

error: linking with `cc` failed: exit status: 1
  |
  = note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET -u XROS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/rust/.bun/bin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/postgresql@15/bin:/opt/homebrew/opt/bison/bin:/Library/PostgreSQL/15/bin:/opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:~/.dotnet/tools:/usr/local/go/bin:/Users/rust/.cargo/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-Wl,-exported_symbols_list" "-Wl,/var/folders/8q/84y6_7s57pn95zn52bf0q_s40000gn/T/rustcykUTyn/list" "/var/folders/8q/84y6_7s57pn95zn52bf0q_s40000gn/T/rustcykUTyn/symbols.o" "-Wl,-rpath" "-Xlinker" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-lrustc-nightly_rt.asan" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/token.token.4b7296f3a308bace-cgu.0.rcgu.o" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/token.csya72qvd4bymj06341q8h89w.rcgu.o" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsoroban_sdk-d247a5f22573c8ec.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsoroban_ledger_snapshot-ab7aefef0cc96cd1.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libserde_json-a002a9e005697505.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libmemchr-090616267f3f7901.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libitoa-8f05517c159c6680.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libryu-4ac60a7ae0b12ca3.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsoroban_env_host-8ce24762054bfc79.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libk256-a9a0b39ff9af7322.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libp256-e43b441423eb34af.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libprimeorder-4f6d5e6a3d79c927.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libark_bls12_381-46f0b78c17220f14.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libark_ec-ac0707ed3751e986.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libark_poly-18cff92a99961c5d.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libhashbrown-44f27f8d83b84280.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libitertools-4c2fb47fc7e519fc.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libeither-0a8c17b154bc3f25.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libark_ff-e78cd68234f5380c.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libark_serialize-587af909ce1489e8.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libnum_bigint-93e9d8d7f8f15974.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libnum_integer-9923a7b3b4d27f6f.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libark_std-19ac90bc5d966799.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libecdsa-d0045a3593c2095f.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/librfc6979-5f8b9c25f86a4256.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsha3-1ed86acfe1200957.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libkeccak-c84daeaf6f6c76c8.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libhmac-1917a866258d5180.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libhex_literal-d43cfa0355ccec66.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libelliptic_curve-70316bc023f2ff3d.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsec1-292210fd101f944a.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libder-d8c233fe6b6bcb67.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libcrypto_bigint-cb22d6007dbaf848.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libbase16ct-376d6182b0132f70.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libgroup-b21306fb0c42e319.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libff-bbf8d793c5de66f7.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/librand-009e6dec31991887.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/librand_chacha-7d19a884c4e8996e.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libppv_lite86-3f6aab5b58f73868.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libed25519_dalek-b371122e8fc14a01.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsha2-1240069ef2146618.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libcurve25519_dalek-e59e9fd14a448529.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libed25519-bc4842b2a589c8e8.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsignature-1272593974185da1.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/librand_core-431e7223fcb0709c.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libgetrandom-d57479f1a5f5317d.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/liblibc-a422471e18183181.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libdigest-daacfb763332e4d0.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsubtle-19b749bd28751f87.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libconst_oid-42d50d0eb9059c44.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libblock_buffer-487e30cafe060d2e.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libcrypto_common-64f53962a69f98e6.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libgeneric_array-8b1aea2a7fdc5b38.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libtypenum-ceac338d74f18fc9.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libzeroize-e043e4d1c80b4877.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsoroban_env_common-41f2e41759a6c3a2.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libwasmparser-b23885c5d3eb4fa7.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsemver-0d79df6885095a0b.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libindexmap-3c91e8782a703594.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libequivalent-5a8f9ba6506492b7.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libstellar_xdr-cf3a25e011aaaece.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libstellar_strkey-9f4e411669a090e0.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libdata_encoding-197ad02bdc3012b4.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libthiserror-d37ae7f0c63dfb37.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libescape_bytes-75001473d8d4ef31.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libbase64-cca8fe5b9a14e405.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libserde_with-6e229e3741010c3c.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libhex-01530e8a5cef6ae6.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libserde-8c4fa97eb0d139ce.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libethnum-1d7b9178db8d3d60.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libarbitrary-d695ff1c4e5410cd.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libstatic_assertions-8b2e8d431745c5ae.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsoroban_wasmi-4a937f082d65ec45.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libwasmi_collections-6e07d7c7bf899b7c.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libhashbrown-0900441511fee4be.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libahash-4a0852c9c12c28b2.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libonce_cell-63b5d3f4bedd96d6.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libcfg_if-5b519199ffe6b2b2.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libzerocopy-09a06ab59073329c.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libbyteorder-e24647e11ad7adb1.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libwasmi_core-d1a2707ec0c9892a.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libdowncast_rs-4c4cf4d7f6286d3a.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libmulti_stash-8fd7bdde32f75c6f.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libarrayvec-42bfb8fb05614a9f.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsmallvec-d564427d914dec47.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libwasmparser_nostd-2d5760119647bd64.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libindexmap_nostd-e29421d5fb3cf982.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libspin-82a505d83347f2bc.rlib" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libnum_traits-98350f13a3f1bd98.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-bd12507ea9de1b71.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-93d955c9cd3e4533.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-0915687e210bffb7.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-b2bb2f04977ecd28.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-dd2390cdda8dc4b6.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-68145c1e99912443.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-e6a6b419406fd850.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-c1ec20b4777466a9.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-ce38132718ee4205.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-3097e2c84a07ec5d.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-32ffe723bdf77c3e.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libadler-f763cffd24af4e4a.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-098a23b14ca8a8d8.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-e647931c654cecd6.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-d3ce6691a1bb8801.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-8bcb1b977f66e047.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-86a91ad72b99b853.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-0d6279724923194b.rlib" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-ba60e47761f9d0f6.rlib" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/rust/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libtoken.dylib" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs"
  = note: ld: initializer pointer has no target in '/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/target/aarch64-apple-darwin/release/deps/libsoroban_sdk-d247a5f22573c8ec.rlib[3](soroban_sdk-d247a5f22573c8ec.soroban_sdk.e857897c86c59d07-cgu.0.rcgu.o)'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile `token` (lib) due to 1 previous error
Error: failed to build fuzz script: ASAN_OPTIONS="detect_odr_violation=0" RUSTFLAGS="-Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-pc-table -Cllvm-args=-sanitizer-coverage-trace-compares --cfg fuzzing -Clink-dead-code -Zsanitizer=address -Cdebug-assertions -C codegen-units=1" "cargo" "build" "--manifest-path" "/Users/rust/sdf_git/talk-stellar-meridian24-testing/token/fuzz/Cargo.toml" "--target" "aarch64-apple-darwin" "--release" "--config" "profile.release.debug=true" "--bin" "fuzz_target_1"
leighmcculloch commented 4 weeks ago

This is the only place I've found the "initializer pointer has no target" error mentioned:

What does this ld error mean?

ld: multiple errors: initializer pointer has no target in ...

Happens on apple clang when building a Rust NAPI dylib with the address sanitizer on.

I can't find documentation on the error.

Ref: https://x.com/yamadapc/status/1825457910962340009 (@yamadapc)

leighmcculloch commented 4 weeks ago

It appears the problem is worked around by removing the "cdylib" crate type. I also tried using multiple crate types like "lib", "cdylib" but taht still errored. I had to remove the entire crate-type config, or set it to only "lib".

Edit: Spoke too soon, and that wasn't enough. While that worked for a fuzzer that imports a contract and sdk, it doesn't work for a fuzz test that actually uses types from there.

leighmcculloch commented 3 weeks ago

Ah, so it appears I've been hit by this issue, we already knew about, and already have a work around for:

The work around is to add --sanitizer=thread to the fuzz run command.

Duplicate of https://github.com/stellar/rs-soroban-sdk/issues/1056