[Bug testsuite/33345] [gdb/testsuite] FAIL: gdb.dap/scopes.exp: fetch all registers success
vries at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Mon Sep 1 09:31:49 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=33345
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Schimpe, Christina from comment #4)
> I missed for the latest fix in scopes.exp that not on all systems the flag
> -fcf-protection is set by default.
> So adding the flag absolutely makes sense if we detect shadow stack support
> on a system (e.g. allow_ssp_tests returns true), in addition to the
> configuring GLIBC_TUNABLES.
>
> But this does not fix the issue that you observed initially with gcc-7, is
> that correct? Because in that case, since the 6.4 kernel doesn't supported
> CET, the pl3_ssp should not have been available actually.
>
> I am still trying to setup a similar system, so I am able to reproduce this.
On my leap 15.6 system with kernel version 6.4, there are two issues.
1.
The system compiler is gcc 7, which doesn't support fcf-protection, so with the
patch from comment 3 I run into trouble.
This can be easily fixed using:
...
+set opts {}
+lappend opts debug
+if { [supports_fcf_protection] } {
+ lappend opts additional_flags=-fcf-protection=return
+}
...
2.
The test-case fails with gcc 7 - 14.
AFAIU from this ( https://docs.kernel.org/next/x86/shstk.html ) I can check
that hw+kernel CET support is present, and that seems to be the case:
...
$ grep -c user_shstk /proc/cpuinfo
12
$
...
However, the other check fails:
...
$ readelf -n outputs/gdb.dap/scopes/scopes | grep -a SHSTK
$
...
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list