Page MenuHomePhabricator

make a debug check thread-safe
AbandonedPublic

Authored by llunak on Apr 5 2022, 2:13 PM.

Diff Detail

Unit TestsFailed

TimeTest
60,150 msx64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vloxseg_mask.c
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +zfh -target-feature +experimental-zvfh -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg_mask.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg_mask.c
60,310 msx64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vloxseg_mask_mf.c
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +zfh -target-feature +experimental-zvfh -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg_mask_mf.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg_mask_mf.c
60,320 msx64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vlsegff_mask.c
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv32 -target-feature +f -target-feature +d -target-feature +v -target-feature +zfh -target-feature +experimental-zvfh -disable-O0-optnone -fallow-half-arguments-and-returns -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vlsegff_mask.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV32 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vlsegff_mask.c
60,250 msx64 debian > Clang.CodeGen/RISCV/rvv-intrinsics::vluxseg_mask_mf.c
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -cc1 -internal-isystem /var/lib/buildkite-agent/builds/llvm-project/build/lib/clang/15.0.0/include -nostdsysteminc -triple riscv64 -target-feature +f -target-feature +d -target-feature +zfh -target-feature +experimental-zvfh -target-feature +v -disable-O0-optnone -emit-llvm /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vluxseg_mask_mf.c -o - | /var/lib/buildkite-agent/builds/llvm-project/build/bin/opt -S -mem2reg | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix=CHECK-RV64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/CodeGen/RISCV/rvv-intrinsics/vluxseg_mask_mf.c
60,500 msx64 debian > Clang.Driver::arm-cortex-cpus-2.c
Script: -- : 'RUN: at line 8'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -target armv8a-linux-eabi -mcpu=cortex-a53+fp16 -### -c /var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/arm-cortex-cpus-2.c 2>&1 | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck --check-prefix CHECK-CORTEX-A53-FP16 /var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/arm-cortex-cpus-2.c
View Full Test Results (8 Failed)

Event Timeline

llunak created this revision.Apr 5 2022, 2:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2022, 2:13 PM
llunak requested review of this revision.Apr 5 2022, 2:13 PM
JDevlieghere accepted this revision.Apr 5 2022, 11:42 PM
JDevlieghere added a subscriber: JDevlieghere.

LGTM

This revision is now accepted and ready to land.Apr 5 2022, 11:42 PM
urnathan requested changes to this revision.EditedApr 6 2022, 4:27 AM

you need to modify the original in libcxxabi/src/demangle and then run the cp script there. Thanks for spotting this!

ETA:but it doesn't matter whether this check runs multiple times, in racing threads? I guess one wants an atomic set though. The once-only bits you've added are probably not available in libcxxabi?

This revision now requires changes to proceed.Apr 6 2022, 4:27 AM

ETA:but it doesn't matter whether this check runs multiple times, in racing threads? I guess one wants an atomic set though.

AFAICT the problem is only that it causes warnings from thread-sanitizer, there is no actual problem as such. I don't know if an atomic set would help (@JDevlieghere can you try please?). But even if, I presume it's not available in libcxxabi either if once isn't?

The once-only bits you've added are probably not available in libcxxabi?

I have no idea about libcxxabi. I'm relatively unfamiliar with LLVM, I've just created this PR because the warning got mentioned as triggered by code in my other PR and I thought this would be a simple fix. If it isn't, then I probably don't know how to do better here.

ETA:but it doesn't matter whether this check runs multiple times, in racing threads? I guess one wants an atomic set though.

AFAICT the problem is only that it causes warnings from thread-sanitizer, there is no actual problem as such. I don't know if an atomic set would help (@JDevlieghere can you try please?). But even if, I presume it's not available in libcxxabi either if once isn't?

ah, that explains it. I didn't want to expose the array outside of the lookup function, but that would be another solution. Then a unit test can test it.

The once-only bits you've added are probably not available in libcxxabi?

I have no idea about libcxxabi. I'm relatively unfamiliar with LLVM, I've just created this PR because the warning got mentioned as triggered by code in my other PR and I thought this would be a simple fix. If it isn't, then I probably don't know how to do better here.

understood. Mind if I grab the PR? (Is there an actual PR to grab?)

understood. Mind if I grab the PR? (Is there an actual PR to grab?)

No, sorry, I meant Phabricator D's. Thank you for taking care of this.

llunak abandoned this revision.Apr 8 2022, 10:40 AM