rust-lang / compiler-builtins

Porting `compiler-rt` intrinsics to Rust
https://github.com/rust-lang/rust/issues/35437
Other
354 stars 203 forks source link

Errors building latest version on arm-android #641

Closed tgross35 closed 1 month ago

tgross35 commented 1 month ago

In https://github.com/rust-lang/rust/pull/125016#issuecomment-2192794308, android tests are timing out attempting to update CB to 0.1.113. I'm just making this issue for a place to track the debugging effort.

https://github.com/rust-lang/compiler-builtins/pull/598 seems to have caused this; I tested reverting it and the job passed https://github.com/rust-lang/rust/pull/127561#issuecomment-2220041060. Also reverted VisionOS to avoid conflicts, but that should be unrelated.

@maurer tested locally and was able to identify these tests as failing:

    [ui] tests/ui/hashmap/hashmap-memory.rs
    [ui] tests/ui/issues/issue-87707.rs
    [ui] tests/ui/process/multi-panic.rs
    [ui] tests/ui/test-attrs/terse.rs
    [ui] tests/ui/threads-sendsync/mpsc_stress.rs
tgross35 commented 1 month ago

For reference - I compiled for the target (cargo rustc --target arm-linux-androideabi --release -- -C codegen-units=1) and listed the symbols (nm -gC) here. Excludes namespaced symbols.

Symbols available from current master (06db2de1c098f9c3cf69a52e7a273f19f0dce061) ```text compiler_builtins-e9178039f931d4f8.compiler_builtins.5be29c3b5c8d4f1e-cgu.0.rcgu.o: 00000000 W __adddf3 00000000 W __adddf3vfp 00000000 W __addsf3 00000000 W __addsf3vfp 00000000 W __addtf3 00000000 W __aeabi_d2f 00000000 W __aeabi_d2h 00000000 W __aeabi_d2iz 00000000 W __aeabi_d2lz 00000000 W __aeabi_d2uiz 00000000 W __aeabi_d2ulz 00000000 W __aeabi_dadd 00000000 W __aeabi_dcmpeq 00000000 W __aeabi_dcmpge 00000000 W __aeabi_dcmpgt 00000000 W __aeabi_dcmple 00000000 W __aeabi_dcmplt 00000000 W __aeabi_dcmpun 00000000 W __aeabi_ddiv 00000000 W __aeabi_dmul 00000000 W __aeabi_dsub 00000000 W __aeabi_f2d 00000000 W __aeabi_f2h 00000000 W __aeabi_f2iz 00000000 W __aeabi_f2lz 00000000 W __aeabi_f2uiz 00000000 W __aeabi_f2ulz 00000000 W __aeabi_fadd 00000000 W __aeabi_fcmpeq 00000000 W __aeabi_fcmpge 00000000 W __aeabi_fcmpgt 00000000 W __aeabi_fcmple 00000000 W __aeabi_fcmplt 00000000 W __aeabi_fcmpun 00000000 W __aeabi_fdiv 00000000 W __aeabi_fmul 00000000 W __aeabi_fsub 00000000 W __aeabi_h2f 00000000 W __aeabi_i2d 00000000 W __aeabi_i2f 00000000 W __aeabi_idiv 00000000 W __aeabi_idivmod 00000000 W __aeabi_l2d 00000000 W __aeabi_l2f 00000000 W __aeabi_lasr 00000000 W __aeabi_ldivmod 00000000 W __aeabi_llsl 00000000 W __aeabi_llsr 00000000 W __aeabi_lmul 00000000 W __aeabi_memclr 00000000 W __aeabi_memclr4 00000000 W __aeabi_memclr8 00000000 W __aeabi_memcpy 00000000 W __aeabi_memcpy4 00000000 W __aeabi_memcpy8 00000000 W __aeabi_memmove 00000000 W __aeabi_memmove4 00000000 W __aeabi_memmove8 00000000 W __aeabi_memset 00000000 W __aeabi_memset4 00000000 W __aeabi_memset8 00000000 W __aeabi_ui2d 00000000 W __aeabi_ui2f 00000000 W __aeabi_uidiv 00000000 W __aeabi_uidivmod 00000000 W __aeabi_ul2d 00000000 W __aeabi_ul2f 00000000 W __aeabi_uldivmod 00000000 W __ashldi3 00000000 W __ashlsi3 00000000 W __ashlti3 00000000 W __ashrdi3 00000000 W __ashrsi3 00000000 W __ashrti3 00000000 W __bswapdi2 00000000 W __bswapsi2 00000000 W __bswapti2 00000000 W __clzsi2 00000000 W __divdf3 00000000 W __divdf3vfp 00000000 W __divdi3 00000000 W __divmoddi4 00000000 W __divmodsi4 00000000 W __divmodti4 00000000 W __divsf3 00000000 W __divsf3vfp 00000000 W __divsi3 00000000 W __divti3 00000000 W __eqdf2 00000000 W __eqdf2vfp 00000000 W __eqsf2 00000000 W __eqsf2vfp 00000000 W __eqtf2 00000000 W __extenddftf2 00000000 W __extendhfsf2 00000000 W __extendhftf2 00000000 W __extendsfdf2 00000000 W __extendsfdf2vfp 00000000 W __extendsftf2 00000000 W __fixdfdi 00000000 W __fixdfsi 00000000 W __fixdfti 00000000 W __fixsfdi 00000000 W __fixsfsi 00000000 W __fixsfti 00000000 W __fixtfdi 00000000 W __fixtfsi 00000000 W __fixtfti 00000000 W __fixunsdfdi 00000000 W __fixunsdfsi 00000000 W __fixunsdfti 00000000 W __fixunssfdi 00000000 W __fixunssfsi 00000000 W __fixunssfti 00000000 W __fixunstfdi 00000000 W __fixunstfsi 00000000 W __fixunstfti 00000000 W __floatdidf 00000000 W __floatdisf 00000000 W __floatsidf 00000000 W __floatsisf 00000000 W __floattidf 00000000 W __floattisf 00000000 W __floatundidf 00000000 W __floatundisf 00000000 W __floatunsidf 00000000 W __floatunsisf 00000000 W __floatuntidf 00000000 W __floatuntisf 00000000 W __gedf2 00000000 W __gedf2vfp 00000000 W __gesf2 00000000 W __gesf2vfp 00000000 W __getf2 00000000 W __gnu_f2h_ieee 00000000 W __gnu_h2f_ieee 00000000 W __gtdf2 00000000 W __gtdf2vfp 00000000 W __gtsf2 00000000 W __gtsf2vfp 00000000 W __gttf2 00000000 W __ledf2 00000000 W __ledf2vfp 00000000 W __lesf2 00000000 W __lesf2vfp 00000000 W __letf2 00000000 W __llvm_memcpy_element_unordered_atomic_1 00000000 W __llvm_memcpy_element_unordered_atomic_2 00000000 W __llvm_memcpy_element_unordered_atomic_4 00000000 W __llvm_memmove_element_unordered_atomic_1 00000000 W __llvm_memmove_element_unordered_atomic_2 00000000 W __llvm_memmove_element_unordered_atomic_4 00000000 W __llvm_memset_element_unordered_atomic_1 00000000 W __llvm_memset_element_unordered_atomic_2 00000000 W __llvm_memset_element_unordered_atomic_4 00000000 W __lshrdi3 00000000 W __lshrsi3 00000000 W __lshrti3 00000000 W __ltdf2 00000000 W __ltdf2vfp 00000000 W __ltsf2 00000000 W __ltsf2vfp 00000000 W __lttf2 00000000 W __moddi3 00000000 W __modsi3 00000000 W __modti3 00000000 W __muldf3 00000000 W __muldf3vfp 00000000 W __muldi3 00000000 W __mulodi4 00000000 W __mulosi4 00000000 W __muloti4 00000000 W __mulsf3 00000000 W __mulsf3vfp 00000000 W __multf3 00000000 W __multi3 00000000 W __nedf2 00000000 W __nedf2vfp 00000000 W __nesf2 00000000 W __nesf2vfp 00000000 W __netf2 00000000 W __powidf2 00000000 W __powisf2 00000000 W __rust_i128_add 00000000 W __rust_i128_addo 00000000 W __rust_i128_mulo 00000000 W __rust_i128_sub 00000000 W __rust_i128_subo 00000000 W __rust_u128_add 00000000 W __rust_u128_addo 00000000 W __rust_u128_mulo 00000000 W __rust_u128_sub 00000000 W __rust_u128_subo 00000000 W __subdf3 00000000 W __subdf3vfp 00000000 W __subsf3 00000000 W __subsf3vfp 00000000 W __subtf3 00000000 W __sync_add_and_fetch_1 00000000 W __sync_add_and_fetch_2 00000000 W __sync_add_and_fetch_4 00000000 W __sync_and_and_fetch_1 00000000 W __sync_and_and_fetch_2 00000000 W __sync_and_and_fetch_4 00000000 W __sync_fetch_and_add_1 00000000 W __sync_fetch_and_add_2 00000000 W __sync_fetch_and_add_4 00000000 W __sync_fetch_and_and_1 00000000 W __sync_fetch_and_and_2 00000000 W __sync_fetch_and_and_4 00000000 W __sync_fetch_and_max_1 00000000 W __sync_fetch_and_max_2 00000000 W __sync_fetch_and_max_4 00000000 W __sync_fetch_and_min_1 00000000 W __sync_fetch_and_min_2 00000000 W __sync_fetch_and_min_4 00000000 W __sync_fetch_and_nand_1 00000000 W __sync_fetch_and_nand_2 00000000 W __sync_fetch_and_nand_4 00000000 W __sync_fetch_and_or_1 00000000 W __sync_fetch_and_or_2 00000000 W __sync_fetch_and_or_4 00000000 W __sync_fetch_and_sub_1 00000000 W __sync_fetch_and_sub_2 00000000 W __sync_fetch_and_sub_4 00000000 W __sync_fetch_and_umax_1 00000000 W __sync_fetch_and_umax_2 00000000 W __sync_fetch_and_umax_4 00000000 W __sync_fetch_and_umin_1 00000000 W __sync_fetch_and_umin_2 00000000 W __sync_fetch_and_umin_4 00000000 W __sync_fetch_and_xor_1 00000000 W __sync_fetch_and_xor_2 00000000 W __sync_fetch_and_xor_4 00000000 W __sync_lock_test_and_set_1 00000000 W __sync_lock_test_and_set_2 00000000 W __sync_lock_test_and_set_4 00000000 W __sync_nand_and_fetch_1 00000000 W __sync_nand_and_fetch_2 00000000 W __sync_nand_and_fetch_4 00000000 W __sync_or_and_fetch_1 00000000 W __sync_or_and_fetch_2 00000000 W __sync_or_and_fetch_4 00000000 W __sync_sub_and_fetch_1 00000000 W __sync_sub_and_fetch_2 00000000 W __sync_sub_and_fetch_4 00000000 W __sync_synchronize 00000000 W __sync_val_compare_and_swap_1 00000000 W __sync_val_compare_and_swap_2 00000000 W __sync_val_compare_and_swap_4 00000000 W __sync_xor_and_fetch_1 00000000 W __sync_xor_and_fetch_2 00000000 W __sync_xor_and_fetch_4 00000000 W __truncdfhf2 00000000 W __truncdfsf2 00000000 W __truncdfsf2vfp 00000000 W __truncsfhf2 00000000 W __trunctfdf2 00000000 W __trunctfhf2 00000000 W __trunctfsf2 00000000 W __udivdi3 00000000 W __udivmoddi4 00000000 W __udivmodsi4 00000000 W __udivmodti4 00000000 W __udivsi3 00000000 W __udivti3 00000000 W __umoddi3 00000000 W __umodsi3 00000000 W __umodti3 00000000 W __unorddf2 00000000 W __unordsf2 00000000 W __unordtf2 00000000 W acos 00000000 W acosf 00000000 W asin 00000000 W asinf 00000000 W atan 00000000 W atan2 00000000 W atan2f 00000000 W atanf 00000000 W cbrt 00000000 W cbrtf 00000000 W ceil 00000000 W ceilf 00000000 W cos 00000000 W cosf 00000000 W cosh 00000000 W coshf 00000000 W exp 00000000 W exp2 00000000 W exp2f 00000000 W expf 00000000 W expm1 00000000 W expm1f 00000000 W fdim 00000000 W fdimf 00000000 W floor 00000000 W floorf 00000000 W fma 00000000 W fmaf 00000000 W fmax 00000000 W fmaxf 00000000 W fmin 00000000 W fminf 00000000 W fmod 00000000 W fmodf 00000000 W hypot 00000000 W hypotf 00000000 W ldexp 00000000 W ldexpf 00000000 W lgamma_r 00000000 W lgammaf_r 00000000 W log 00000000 W log10 00000000 W log10f 00000000 W log1p 00000000 W log1pf 00000000 W log2 00000000 W log2f 00000000 W logf 00000000 W pow 00000000 W powf 00000000 W rint 00000000 W rintf 00000000 W round 00000000 W roundf 00000000 T rust_begin_unwind 00000000 W sin 00000000 W sinf 00000000 W sinh 00000000 W sinhf 00000000 W sqrt 00000000 W sqrtf 00000000 W tan 00000000 W tanf 00000000 W tanh 00000000 W tanhf 00000000 W tgamma 00000000 W tgammaf 00000000 W trunc 00000000 W truncf ```
Symbols available from my revert test (tgross35/android-testing, 42538d8077cb3e2e86ccd4b73266b8f352af3f77). `weak-intrinsics` feature not enabled. ```text compiler_builtins-e9178039f931d4f8.compiler_builtins.5be29c3b5c8d4f1e-cgu.0.rcgu.o: 00000000 T __adddf3 00000000 T __adddf3vfp 00000000 T __addsf3 00000000 T __addsf3vfp 00000000 T __addtf3 00000000 W __aeabi_d2f 00000000 W __aeabi_d2h 00000000 W __aeabi_d2iz 00000000 W __aeabi_d2lz 00000000 W __aeabi_d2uiz 00000000 W __aeabi_d2ulz 00000000 W __aeabi_dadd 00000000 T __aeabi_dcmpeq 00000000 T __aeabi_dcmpge 00000000 T __aeabi_dcmpgt 00000000 T __aeabi_dcmple 00000000 T __aeabi_dcmplt 00000000 W __aeabi_dcmpun 00000000 W __aeabi_ddiv 00000000 W __aeabi_dmul 00000000 W __aeabi_dsub 00000000 W __aeabi_f2d 00000000 W __aeabi_f2h 00000000 W __aeabi_f2iz 00000000 W __aeabi_f2lz 00000000 W __aeabi_f2uiz 00000000 W __aeabi_f2ulz 00000000 W __aeabi_fadd 00000000 T __aeabi_fcmpeq 00000000 T __aeabi_fcmpge 00000000 T __aeabi_fcmpgt 00000000 T __aeabi_fcmple 00000000 T __aeabi_fcmplt 00000000 W __aeabi_fcmpun 00000000 W __aeabi_fdiv 00000000 W __aeabi_fmul 00000000 W __aeabi_fsub 00000000 W __aeabi_h2f 00000000 W __aeabi_i2d 00000000 W __aeabi_i2f 00000000 W __aeabi_idiv 00000000 W __aeabi_idivmod 00000000 W __aeabi_l2d 00000000 W __aeabi_l2f 00000000 W __aeabi_lasr 00000000 W __aeabi_ldivmod 00000000 W __aeabi_llsl 00000000 W __aeabi_llsr 00000000 W __aeabi_lmul 00000000 W __aeabi_memclr 00000000 W __aeabi_memclr4 00000000 W __aeabi_memclr8 00000000 W __aeabi_memcpy 00000000 W __aeabi_memcpy4 00000000 W __aeabi_memcpy8 00000000 W __aeabi_memmove 00000000 W __aeabi_memmove4 00000000 W __aeabi_memmove8 00000000 W __aeabi_memset 00000000 W __aeabi_memset4 00000000 W __aeabi_memset8 00000000 W __aeabi_ui2d 00000000 W __aeabi_ui2f 00000000 W __aeabi_uidiv 00000000 W __aeabi_uidivmod 00000000 W __aeabi_ul2d 00000000 W __aeabi_ul2f 00000000 W __aeabi_uldivmod 00000000 T __ashldi3 00000000 T __ashlsi3 00000000 T __ashlti3 00000000 T __ashrdi3 00000000 T __ashrsi3 00000000 T __ashrti3 00000000 T __bswapdi2 00000000 T __bswapsi2 00000000 T __bswapti2 00000000 T __clzsi2 00000000 T __divdf3 00000000 T __divdf3vfp 00000000 T __divdi3 00000000 T __divmoddi4 00000000 T __divmodsi4 00000000 T __divmodti4 00000000 T __divsf3 00000000 T __divsf3vfp 00000000 T __divsi3 00000000 T __divti3 00000000 T __eqdf2 00000000 T __eqdf2vfp 00000000 T __eqsf2 00000000 T __eqsf2vfp 00000000 T __eqtf2 00000000 T __extenddftf2 00000000 T __extendhfsf2 00000000 T __extendhftf2 00000000 T __extendsfdf2 00000000 T __extendsfdf2vfp 00000000 T __extendsftf2 00000000 T __fixdfdi 00000000 T __fixdfsi 00000000 T __fixdfti 00000000 T __fixsfdi 00000000 T __fixsfsi 00000000 T __fixsfti 00000000 T __fixtfdi 00000000 T __fixtfsi 00000000 T __fixtfti 00000000 T __fixunsdfdi 00000000 T __fixunsdfsi 00000000 T __fixunsdfti 00000000 T __fixunssfdi 00000000 T __fixunssfsi 00000000 T __fixunssfti 00000000 T __fixunstfdi 00000000 T __fixunstfsi 00000000 T __fixunstfti 00000000 T __floatdidf 00000000 T __floatdisf 00000000 T __floatsidf 00000000 T __floatsisf 00000000 T __floattidf 00000000 T __floattisf 00000000 T __floatundidf 00000000 T __floatundisf 00000000 T __floatunsidf 00000000 T __floatunsisf 00000000 T __floatuntidf 00000000 T __floatuntisf 00000000 T __gedf2 00000000 T __gedf2vfp 00000000 T __gesf2 00000000 T __gesf2vfp 00000000 T __getf2 00000000 T __gnu_f2h_ieee 00000000 T __gnu_h2f_ieee 00000000 T __gtdf2 00000000 T __gtdf2vfp 00000000 T __gtsf2 00000000 T __gtsf2vfp 00000000 T __gttf2 00000000 T __ledf2 00000000 T __ledf2vfp 00000000 T __lesf2 00000000 T __lesf2vfp 00000000 T __letf2 00000000 T __llvm_memcpy_element_unordered_atomic_1 00000000 T __llvm_memcpy_element_unordered_atomic_2 00000000 T __llvm_memcpy_element_unordered_atomic_4 00000000 T __llvm_memmove_element_unordered_atomic_1 00000000 T __llvm_memmove_element_unordered_atomic_2 00000000 T __llvm_memmove_element_unordered_atomic_4 00000000 T __llvm_memset_element_unordered_atomic_1 00000000 T __llvm_memset_element_unordered_atomic_2 00000000 T __llvm_memset_element_unordered_atomic_4 00000000 T __lshrdi3 00000000 T __lshrsi3 00000000 T __lshrti3 00000000 T __ltdf2 00000000 T __ltdf2vfp 00000000 T __ltsf2 00000000 T __ltsf2vfp 00000000 T __lttf2 00000000 T __moddi3 00000000 T __modsi3 00000000 T __modti3 00000000 T __muldf3 00000000 T __muldf3vfp 00000000 T __muldi3 00000000 T __mulodi4 00000000 T __mulosi4 00000000 T __muloti4 00000000 T __mulsf3 00000000 T __mulsf3vfp 00000000 T __multf3 00000000 T __multi3 00000000 T __nedf2 00000000 T __nedf2vfp 00000000 T __nesf2 00000000 T __nesf2vfp 00000000 T __netf2 00000000 T __powidf2 00000000 T __powisf2 00000000 T __rust_i128_add 00000000 T __rust_i128_addo 00000000 T __rust_i128_mulo 00000000 T __rust_i128_sub 00000000 T __rust_i128_subo 00000000 T __rust_u128_add 00000000 T __rust_u128_addo 00000000 T __rust_u128_mulo 00000000 T __rust_u128_sub 00000000 T __rust_u128_subo 00000000 T __subdf3 00000000 T __subdf3vfp 00000000 T __subsf3 00000000 T __subsf3vfp 00000000 T __subtf3 00000000 T __sync_add_and_fetch_1 00000000 T __sync_add_and_fetch_2 00000000 T __sync_add_and_fetch_4 00000000 T __sync_and_and_fetch_1 00000000 T __sync_and_and_fetch_2 00000000 T __sync_and_and_fetch_4 00000000 T __sync_fetch_and_add_1 00000000 T __sync_fetch_and_add_2 00000000 T __sync_fetch_and_add_4 00000000 T __sync_fetch_and_and_1 00000000 T __sync_fetch_and_and_2 00000000 T __sync_fetch_and_and_4 00000000 T __sync_fetch_and_max_1 00000000 T __sync_fetch_and_max_2 00000000 T __sync_fetch_and_max_4 00000000 T __sync_fetch_and_min_1 00000000 T __sync_fetch_and_min_2 00000000 T __sync_fetch_and_min_4 00000000 T __sync_fetch_and_nand_1 00000000 T __sync_fetch_and_nand_2 00000000 T __sync_fetch_and_nand_4 00000000 T __sync_fetch_and_or_1 00000000 T __sync_fetch_and_or_2 00000000 T __sync_fetch_and_or_4 00000000 T __sync_fetch_and_sub_1 00000000 T __sync_fetch_and_sub_2 00000000 T __sync_fetch_and_sub_4 00000000 T __sync_fetch_and_umax_1 00000000 T __sync_fetch_and_umax_2 00000000 T __sync_fetch_and_umax_4 00000000 T __sync_fetch_and_umin_1 00000000 T __sync_fetch_and_umin_2 00000000 T __sync_fetch_and_umin_4 00000000 T __sync_fetch_and_xor_1 00000000 T __sync_fetch_and_xor_2 00000000 T __sync_fetch_and_xor_4 00000000 T __sync_lock_test_and_set_1 00000000 T __sync_lock_test_and_set_2 00000000 T __sync_lock_test_and_set_4 00000000 T __sync_nand_and_fetch_1 00000000 T __sync_nand_and_fetch_2 00000000 T __sync_nand_and_fetch_4 00000000 T __sync_or_and_fetch_1 00000000 T __sync_or_and_fetch_2 00000000 T __sync_or_and_fetch_4 00000000 T __sync_sub_and_fetch_1 00000000 T __sync_sub_and_fetch_2 00000000 T __sync_sub_and_fetch_4 00000000 T __sync_synchronize 00000000 T __sync_val_compare_and_swap_1 00000000 T __sync_val_compare_and_swap_2 00000000 T __sync_val_compare_and_swap_4 00000000 T __sync_xor_and_fetch_1 00000000 T __sync_xor_and_fetch_2 00000000 T __sync_xor_and_fetch_4 00000000 T __truncdfhf2 00000000 T __truncdfsf2 00000000 T __truncdfsf2vfp 00000000 T __truncsfhf2 00000000 T __trunctfdf2 00000000 T __trunctfhf2 00000000 T __trunctfsf2 00000000 T __udivdi3 00000000 T __udivmoddi4 00000000 T __udivmodsi4 00000000 T __udivmodti4 00000000 T __udivsi3 00000000 T __udivti3 00000000 T __umoddi3 00000000 T __umodsi3 00000000 T __umodti3 00000000 T __unorddf2 00000000 T __unordsf2 00000000 T __unordtf2 00000000 W acos 00000000 W acosf 00000000 W asin 00000000 W asinf 00000000 W atan 00000000 W atan2 00000000 W atan2f 00000000 W atanf 00000000 W cbrt 00000000 W cbrtf 00000000 W ceil 00000000 W ceilf 00000000 W cos 00000000 W cosf 00000000 W cosh 00000000 W coshf 00000000 W exp 00000000 W exp2 00000000 W exp2f 00000000 W expf 00000000 W expm1 00000000 W expm1f 00000000 W fdim 00000000 W fdimf 00000000 W floor 00000000 W floorf 00000000 W fma 00000000 W fmaf 00000000 W fmax 00000000 W fmaxf 00000000 W fmin 00000000 W fminf 00000000 W fmod 00000000 W fmodf 00000000 W hypot 00000000 W hypotf 00000000 W ldexp 00000000 W ldexpf 00000000 W lgamma_r 00000000 W lgammaf_r 00000000 W log 00000000 W log10 00000000 W log10f 00000000 W log1p 00000000 W log1pf 00000000 W log2 00000000 W log2f 00000000 W logf 00000000 W pow 00000000 W powf 00000000 W rint 00000000 W rintf 00000000 W round 00000000 W roundf 00000000 T rust_begin_unwind 00000000 W sin 00000000 W sinf 00000000 W sinh 00000000 W sinhf 00000000 W sqrt 00000000 W sqrtf 00000000 W tan 00000000 W tanf 00000000 W tanh 00000000 W tanhf 00000000 W tgamma 00000000 W tgammaf 00000000 W trunc 00000000 W truncf ```

Looks like most of the __aeabi_* symbols have always been weak (with some exceptions) as well as math symbols, Nothing too surprising.

tgross35 commented 1 month ago

Building one of the failing tests tests/ui/process/multi-panic.rs for that target gives these undefined symbols:

         U core::fmt::builders::DebugList::finish
         U core::fmt::Formatter::debug_list
         U core::fmt::Formatter::debug_tuple_field1_finish
         U core::fmt::Formatter::debug_tuple_field2_finish
         U core::fmt::Formatter::pad
         U core::fmt::Formatter::write_str
         U core::num::<impl core::str::traits::FromStr for usize>::from_str
         U core::slice::index::slice_index_order_fail
         U core::slice::index::slice_end_index_len_fail
         U core::slice::index::slice_start_index_len_fail
         U core::slice::memchr::memchr_aligned
         U core::option::unwrap_failed
         U core::result::unwrap_failed
         U core::panicking::panic_const::panic_const_div_by_zero
         U core::panicking::panic_nounwind
         U core::panicking::panic_in_cleanup
         U core::panicking::panic_bounds_check
         U core::panicking::assert_failed_inner
         U core::panicking::panic_cannot_unwind
         U core::panicking::panic
         U core::panicking::panic_fmt
         U <std::io::error::Error as core::fmt::Debug>::fmt
         U alloc::ffi::c_str::CString::_from_vec_unchecked
         U alloc::alloc::handle_alloc_error
         U alloc::string::String::from_utf8_lossy
         U alloc::raw_vec::handle_error
         U <std::sys::pal::unix::stdio::Stderr as std::io::Write>::write
         U <std::env::Args as core::iter::traits::iterator::Iterator>::next
         U <std::env::Args as core::iter::traits::iterator::Iterator>::size_hint
         U <alloc::collections::btree::mem::replace::PanicGuard as core::ops::drop::Drop>::drop
         U __aeabi_memclr
         U __aeabi_memcpy
         U __aeabi_memcpy4
         U __aeabi_uidiv
         U __rust_alloc
         U __rust_alloc_zeroed
         U __rust_dealloc
         U __rust_no_alloc_shim_is_unstable
         U __rust_realloc
         U __sync_fetch_and_add_4
         U __sync_fetch_and_sub_4
         U __sync_lock_test_and_set_4
         U __sync_synchronize
         U __sync_val_compare_and_swap_4
         U close
         U fcntl
         U memcmp
         U rust_eh_personality

Complete shot in the dark here but I wonder if the __sync_* symbols could be the problem, since they used to be strong but became weak. And all the failing tests seem to have something to do with threads / synchronization. And assuming that if any of the core/std symbols had problems, they would have shown up elsewhere.

tgross35 commented 1 month ago

Missing dunder symbols for each:

hashmap-memory.o ```text U __aeabi_memclr U __aeabi_memclr4 U __aeabi_memcpy U __aeabi_memcpy4 U __aeabi_memcpy8 U __aeabi_memmove U __aeabi_memmove4 U __aeabi_memset U __aeabi_uidiv U __aeabi_uidivmod U __rust_alloc U __rust_alloc_zeroed U __rust_dealloc U __rust_no_alloc_shim_is_unstable U __rust_realloc U __sync_fetch_and_add_4 U __sync_fetch_and_or_4 U __sync_fetch_and_sub_4 U __sync_lock_test_and_set_1 U __sync_lock_test_and_set_4 U __sync_synchronize U __sync_val_compare_and_swap_1 U __sync_val_compare_and_swap_4 ```
issue-87707.o ```text U __rust_alloc U __rust_alloc_zeroed U __rust_dealloc U __rust_no_alloc_shim_is_unstable U __sync_val_compare_and_swap_4 ```
mpsc-stress.o ```text U __aeabi_memclr U __aeabi_memclr4 U __aeabi_memcpy U __aeabi_memcpy4 U __aeabi_memcpy8 U __aeabi_memmove4 U __aeabi_memset U __aeabi_uidiv U __aeabi_uldivmod U __rust_alloc U __rust_alloc_zeroed U __rust_dealloc U __rust_no_alloc_shim_is_unstable U __rust_realloc U __sync_fetch_and_add_4 U __sync_fetch_and_or_4 U __sync_fetch_and_sub_4 U __sync_lock_test_and_set_1 U __sync_lock_test_and_set_4 U __sync_synchronize U __sync_val_compare_and_swap_1 U __sync_val_compare_and_swap_4 ```
multi-panic.o ```text U __aeabi_memclr U __aeabi_memcpy U __aeabi_memcpy4 U __aeabi_uidiv U __rust_alloc U __rust_alloc_zeroed U __rust_dealloc U __rust_no_alloc_shim_is_unstable U __rust_realloc U __sync_fetch_and_add_4 U __sync_fetch_and_sub_4 U __sync_lock_test_and_set_4 U __sync_synchronize U __sync_val_compare_and_swap_4 ```
terse.o ```text U __aeabi_memcpy U __aeabi_uidiv U __rust_alloc U __rust_alloc_zeroed U __rust_no_alloc_shim_is_unstable ```

__sync_val_compare_and_swap_4 exists on all but terse, maybe something to check. Disassembly of our version:

Disassembly of section .text._ZN17compiler_builtins9arm_linux29__sync_val_compare_and_swap_417h38f45028923f7fb2E:

00000000 <_ZN17compiler_builtins9arm_linux29__sync_val_compare_and_swap_417h38f45028923f7fb2E>:
   0:   e92d48f0        push    {r4, r5, r6, r7, fp, lr}
   4:   e59f7034        ldr     r7, [pc, #52]   @ 40 <_ZN17compiler_builtins9arm_linux29__sync_val_compare_and_swap_417h38f45028923f7fb2E+0x40>
   8:   e1a05002        mov     r5, r2
   c:   e1a04001        mov     r4, r1
  10:   e1a06000        mov     r6, r0
  14:   e5960000        ldr     r0, [r6]
  18:   e1500004        cmp     r0, r4
  1c:   1a000006        bne     3c <_ZN17compiler_builtins9arm_linux29__sync_val_compare_and_swap_417h38f45028923f7fb2E+0x3c>
  20:   e1a00004        mov     r0, r4
  24:   e1a01005        mov     r1, r5
  28:   e1a02006        mov     r2, r6
  2c:   e12fff37        blx     r7
  30:   e3500000        cmp     r0, #0
  34:   1afffff6        bne     14 <_ZN17compiler_builtins9arm_linux29__sync_val_compare_and_swap_417h38f45028923f7fb2E+0x14>
  38:   e1a00004        mov     r0, r4
  3c:   e8bd88f0        pop     {r4, r5, r6, r7, fp, pc}
  40:   ffff0fc0        .word   0xffff0fc
tgross35 commented 1 month ago

Making the __sync_* symbols strong again fixed this. https://github.com/rust-lang/rust/pull/127561#issuecomment-2235545023

tgross35 commented 1 month ago

I just realized that another thing changed by https://github.com/rust-lang/compiler-builtins/pull/598, probably inadvertently, is that extern "C" was dropped. See this part of the diff, $abi is missing https://github.com/rust-lang/compiler-builtins/pull/598/files#diff-315c02cd05738da173861537577d159833f70f79cfda8cd7cf1a0d7a28ace31bR457-R465.

It seems unlikely but if (1) the system __sync_* symbols are weak or do not exist, and (2) Rust is using its own ABI, then this could be problematic.

I'm going to do another try run with only this fix just to get a better answer here.

Edit: try https://github.com/rust-lang/rust/pull/127561#issuecomment-2235969765

tgross35 commented 1 month ago

Looks like maybe it's only the ABI and not weak/strong, see https://github.com/rust-lang/compiler-builtins/pull/642#issuecomment-2236134390

tgross35 commented 1 month ago

With the ABI fix at e7fd5be54ae5b636d16de041e6700c80624131bf that adds extern "C" back

Disassembly of section .text._ZN17compiler_builtins9arm_linux29__sync_val_compare_and_swap_417hfe807ac00790ab96E:

00000000 <__sync_val_compare_and_swap_4>:
       0: e92d48f0      push    {r4, r5, r6, r7, r11, lr}
       4: e59f7034      ldr r7, [pc, #52]           @ 0x40 <$d.720>
       8: e1a05002      mov r5, r2
       c: e1a04001      mov r4, r1
      10: e1a06000      mov r6, r0
      14: e5960000      ldr r0, [r6]
      18: e1500004      cmp r0, r4
      1c: 1a000006      bne 0x3c <__sync_val_compare_and_swap_4+0x3c> @ imm = #24
      20: e1a00004      mov r0, r4
      24: e1a01005      mov r1, r5
      28: e1a02006      mov r2, r6
      2c: e12fff37      blx r7
      30: e3500000      cmp r0, #0
      34: 1afffff6      bne 0x14 <__sync_val_compare_and_swap_4+0x14> @ imm = #-40
      38: e1a00004      mov r0, r4
      3c: e8bd88f0      pop {r4, r5, r6, r7, r11, pc}

00000040 <$d.720>:
      40: c0 0f ff ff   .word   0xffff0fc0

Identical asm except for which registers get pushed or popped. Got you!