From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 023D53858D1E; Wed, 30 Nov 2022 20:47:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 023D53858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669841222; bh=WIlTNz03A0LIyyPdC40NqkJwF9dnu6LTbRGDedCs8Js=; h=From:To:Subject:Date:From; b=JLgE5ioY54uXHXQuU328kpfUaRGf5off2Q3sAXb7cL7jH0rOkRAMWIgXdRZuqqJPf +d6yqz/R9rnqFi/n0tDPopysuYTlPC5J/S6RUf51xIwDpjYJHziqyIb7Pj2MrPMRdZ EjUdaBJwwuGgp/NQ+UdiKoN2PoakMQLoN6KH3Q10= From: "laurent.alfonsi at linaro dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107940] New: temp_directory_path testcase broken Date: Wed, 30 Nov 2022 20:47:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: laurent.alfonsi at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107940 Bug ID: 107940 Summary: temp_directory_path testcase broken Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: laurent.alfonsi at linaro dot org Target Milestone: --- Testcase of gnu testsuite=20 =20=20 libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_pa= th.cc sometimes crashes and leaves a directory with broken user/permissions. i.e : $ ls -lrt builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-gcc.git~master-stage2/aarc= h64-linux-gnu/libstdc++-v3/testsuite/normal14/filesystem-test.temp_director= y_path.193969877.WdDDBh/ ls: cannot access 'builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-gcc.git~master-stage2/aar= ch64-linux-gnu/libstdc++-v3/testsuite/normal14/filesystem-test.temp_directo= ry_path.193969877.WdDDBh/tmp': Permission denied total 0 d????????? ? ? ? ? ? tmp It is probably useless but here are the cmd launched by dejagnu to build th= is test : ABE=3D$PWD $PWD/builds/destdir/x86_64-pc-linux-gnu/bin/aarch64-linux-gnu-g++ \ =20=20=20=20 -B$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/./gc= c \ -nostdinc++ \ =20=20=20=20 -L$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/libstdc++-v3/src \ =20=20=20=20 -L$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/libstdc++-v3/src/.libs \ =20=20=20=20 -L$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/libstdc++-v3/libsupc++/.libs \ -B$ABE/builds/destdir/x86_64-pc-linux-gnu/aarch64-linux-gnu/bin/ \ -B$ABE/builds/destdir/x86_64-pc-linux-gnu/aarch64-linux-gnu/lib/ \ -isystem $ABE/builds/destdir/x86_64-pc-linux-gnu/aarch64-linux-gnu/inc= lude \ -isystem $ABE/builds/destdir/x86_64-pc-linux-gnu/aarch64-linux-gnu/sys-include \ =20=20=20=20 -B$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/./libstdc++-v3/src/.libs \ -O1 \ -D_GNU_SOURCE \ -DLOCALEDIR=3D"." \ -nostdinc++ \ =20=20=20=20 -I$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/libstdc++-v3/include/aarch64-linux-gnu \ =20=20=20=20 -I$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/libstdc++-v3/include \ -I$ABE/snapshots/$GCCVER/libstdc++-v3/libsupc++ \ -I$ABE/snapshots/$GCCVER/libstdc++-v3/include/backward \ -I$ABE/snapshots/$GCCVER/libstdc++-v3/testsuite/util \ =20=20=20=20 $ABE/snapshots/gcc~master/libstdc++-v3/testsuite/experimental/filesystem/op= erations/temp_directory_path.cc \ -DUSE_FILESYSTEM_TS \ -lstdc++fs \ -Wl,--gc-sections \ =20=20=20=20 -L$ABE/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/gcc-$GCCVER-stage2/aarc= h64-linux-gnu/libstdc++-v3/src/filesystem/.libs \ -lm -g -static \ -o ./temp_directory_path.exe The test sometimes crashes while running temp_directory_path.exe - crashes with O2, ok with O1. - crashes when using qemu-aarch64 v7.2.0-rc0-24-g98f10f0e26, ok with qemu v7.2.0-rc2-19-gac14949821 - on native aa64, and it seems to work. - But valgrind reports many uninitialized values, ... Which explain this instability to pass/fail. sanitizer=3Daddress reports an issue while stack unwinding : =3D=3D13419=3D=3DERROR: AddressSanitizer: SEGV on unknown address 0x000= 000000000 (pc 0x0055012adf14 bp 0x0055007ff090 sp 0x0055007ff090 T0) =3D=3D13419=3D=3DThe signal is caused by a UNKNOWN memory access. =3D=3D13419=3D=3DHint: address points to the zero page. #0 0x55012adf14 in aarch64_fallback_frame_state md-unwind-support.h= :74 #1 0x55012adf14 in uw_frame_state_for /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/lib= gcc/unwind-dw2.c:1275 #2 0x55012af2f8 in _Unwind_RaiseException /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/lib= gcc/unwind.inc:104 #3 0x550106e5c0 in __cxa_throw /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/lib= stdc++-v3/libsupc++/eh_throw.cc:93 #4 0x4141c4 in std::experimental::filesystem::v1::temp_directory_path[abi:cxx11]() /home/laurent.alfonsi/abe/snapshots/gcc.git~master/libstdc++-v3/src/filesys= tem/ops.cc:1337 #5 0x40deb8 in test03() /home/laurent.alfonsi/abe/snapshots/gcc~master/libstdc++-v3/testsuite/exper= imental/filesystem/operations/temp_directory_path.cc:121 #6 0x4034cc in main /home/laurent.alfonsi/abe/snapshots/gcc~master/libstdc++-v3/testsuite/exper= imental/filesystem/operations/temp_directory_path.cc:162 #7 0x550130b2e8 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #8 0x550130b3b8 in __libc_start_main_impl ../csu/libc-start.c:381 #9 0x403aec in _start (/home/laurent.alfonsi/abe/temp_directory_path.exe+0x403aec) (BuildId: be39c337f0ff0a3afba1bb02d7ff75402eb15fb4) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV md-unwind-support.h:74 in aarch64_fallback_frame_state =3D=3D13419=3D=3DABORTING This may be linked to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90787. But, I confirm my toolchain is based on trunk (13.0), and contains the 90787 fix.=