forked from Imagelibrary/binutils-gdb
Since [commit] [testsuite patch] Fix gcc_compiled for gcc 6 & 7 https://sourceware.org/ml/gdb-patches/2016-10/msg00620.html there has started running again Running gdb/testsuite/gdb.base/morestack.exp ... +FAIL: gdb.base/morestack.exp: continue +PASS: gdb.base/morestack.exp: up 3000 but as you can see it FAILs now - on Fedora 24 x86_64 (although for example it still PASSes on CentOS-7.2 x86_64). Program received signal SIGSEGV, Segmentation fault. 0x00007ffff787c7bb in malloc_consolidate (av=av@entry=0x7ffff7bbcb00 <main_arena>) at malloc.c:4181 4181 unlink(av, nextchunk, bck, fwd); (gdb) bt [...] [...] This apparently is due to - man gcc - -fsplit-stack: When code compiled with -fsplit-stack calls code compiled without -fsplit-stack, there may not be much stack space available for the latter code to run. If compiling all code, including library code, with -fsplit-stack is not an option, then the linker can fix up these calls so that the code compiled without -fsplit-stack always has a large stack. Support for this is implemented in the gold linker in GNU binutils release 2.21 and later. gdb/testsuite/ChangeLog 2016-10-24 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.base/morestack.exp: Try to build it using -fuse-ld=gold first.
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
# Copyright (C) 2011-2016 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
if [get_compiler_info] {
|
|
return -1
|
|
}
|
|
|
|
if {$gcc_compiled == 0} {
|
|
return -1
|
|
}
|
|
|
|
standard_testfile
|
|
|
|
# -fuse-ld=gold is used for calling printf code built without -fsplit-stack
|
|
# which could crash otherwise. See GCC documentation of -fsplit-stack.
|
|
set opts "additional_flags=-fsplit-stack"
|
|
if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile [list $opts additional_flags=-fuse-ld=gold]] \
|
|
&& [prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts] } {
|
|
return -1
|
|
}
|
|
|
|
if ![runto_main] {
|
|
return -1
|
|
}
|
|
|
|
gdb_breakpoint "marker_hit"
|
|
gdb_breakpoint "marker_miss"
|
|
|
|
set test "continue"
|
|
gdb_test_multiple $test $test {
|
|
-re "marker_hit.*$gdb_prompt $" {
|
|
pass $test
|
|
}
|
|
-re "marker_miss.*$gdb_prompt $" {
|
|
# The testcase failed to violated the frame_id_inner condition by
|
|
# handing inner frame with higher (on the stack-grows-down arches)
|
|
# $sp address than the outer frame.
|
|
xfail $test
|
|
return 0
|
|
}
|
|
}
|
|
|
|
# FAIL was on `bt' producing:
|
|
# Backtrace stopped: previous frame inner to this frame (corrupt stack?)
|
|
gdb_test "up 3000" " in main .*"
|