Skip to content

ctrmm_iutncopy generic/ztrmm_utcopy_8.c:831 : WARNING: ThreadSanitizer: heap-use-after-free #601

Closed
@vondele

Description

@vondele

Compiling openblas (from the release xianyi-OpenBLAS-v0.2.14-0-gd0c51c4.zip) on CORE=SANDYBRIDGE
LIBCORE=sandybridge
using:
make -j 24 USE_THREAD=0 LIBNAMESUFFIX=serial
one of the tests fails with:
xianyi-OpenBLAS-d0c51c4/ctest> OPENBLAS_NUM_THREADS=1 ./xccblat3 < cin3
[...]

cblas_ctrmm PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS ( 2592 CALLS)

WARNING: ThreadSanitizer: heap-use-after-free (pid=28032)
Read of size 4 at 0x7d0c0000efb8 by main thread:
#0 ctrmm_iutucopy generic/ztrmm_utcopy_8.c:834 (xccblat3+0x0000004aefd2)
#1 ctrmm_LNUU /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/driver/level3/trmm_L.c:129 (xccblat3+0x00000042cd3b)
#2 cblas_ctrmm /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/interface/trsm.c:369 (xccblat3+0x00000042355a)
#3 cctrmm_ /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblas3.c:491 (xccblat3+0x0000004159ad)
#4 cchk3_ /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblat3.f:1234 (xccblat3+0x00000040c0ca)
#5 cblat3 /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblat3.f:338 (xccblat3+0x000000411b8e)
#6 main /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblat3.f:424 (xccblat3+0x000000401884)

Previous write of size 8 at 0x7d0c0000efb8 by main thread:
[failed to restore the stack]

SUMMARY: ThreadSanitizer: heap-use-after-free generic/ztrmm_utcopy_8.c:834 ctrmm_iutucopy

WARNING: ThreadSanitizer: heap-use-after-free (pid=28032)
Read of size 4 at 0x7d0c0000efa0 by main thread:
#0 ctrmm_iutncopy generic/ztrmm_utcopy_8.c:831 (xccblat3+0x0000004b24f7)
#1 ctrmm_LNUN /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/driver/level3/trmm_L.c:129 (xccblat3+0x00000042d3fb)
#2 cblas_ctrmm /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/interface/trsm.c:369 (xccblat3+0x00000042355a)
#3 cctrmm_ /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblas3.c:491 (xccblat3+0x0000004159ad)
#4 cchk3_ /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblat3.f:1234 (xccblat3+0x00000040c0ca)
#5 cblat3 /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblat3.f:338 (xccblat3+0x000000411b8e)
#6 main /data/vjoost/toolchain-tsan/build/xianyi-OpenBLAS-d0c51c4/ctest/c_cblat3.f:424 (xccblat3+0x000000401884)

Previous write of size 8 at 0x7d0c0000efa0 by main thread:
[failed to restore the stack]

SUMMARY: ThreadSanitizer: heap-use-after-free generic/ztrmm_utcopy_8.c:831 ctrmm_iutncopy

cblas_ctrmm PASSED THE ROW-MAJOR COMPUTATIONAL TESTS ( 2592 CALLS)

I have been compiling openblas with -fsanitize=thread using a slightly modified gcc 5.1.0

The problem appears to be core specific, as on westmere I didn't observe this (or I overlooked this ?).

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