Handle -fstack-protector prologue code

Bug #616000 reported by Ulrich Weigand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GDB
Fix Released
Medium
Yao Qi

Bug Description

FAIL: gdb.mi/gdb792.exp: list children of class A
FAIL: gdb.mi/gdb792.exp: list children of A.public
FAIL: gdb.mi/gdb792.exp: list children of A.private
FAIL: gdb.mi/gdb792.exp: list children of A.protected
FAIL: gdb.mi/gdb792.exp: list children of A.protected.b
FAIL: gdb.mi/gdb792.exp: list children of A.protected.b.public
FAIL: gdb.mi/gdb792.exp: list children of A.protected.b.private
FAIL: gdb.mi/gdb792.exp: list children of class C

Needs further analysis.

Tags: testsuite

Related branches

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Buildlogs on https://launchpad.net/ubuntu/+source/gdb/7.1-1ubuntu4 shows this case fails on armel/x86/amd64.

Changed in gdb-linaro:
status: New → Confirmed
Revision history for this message
Ulrich Weigand (uweigand) wrote :

The Ubuntu compiler will automatically build everything (including this testcase) with -fstack-protector.
It seems GDB prologue parsing gets confused by stack protector code both on i386 and ARM ...

Changed in gdb-linaro:
importance: Undecided → Medium
Revision history for this message
Michael Hope (michaelh1) wrote :

Note that the testsuite is run with the latest Linaro compiler which may not (does not?) enable stack protector or fortify.

See the head of the configure log, such as:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5-2010.10-0/logs/armv7l-maverick-cbuild11-pavo4/gcc-configure.txt

for the current configure flags.

The gdb-maverick-testsuite run is built using the Ubuntu-supplied host compiler and will have both.

Revision history for this message
Ulrich Weigand (uweigand) wrote :

Good point. And indeed, if you look at the test run with the Linaro compiler, these tests succeed:
http://ex.seabright.co.nz/build/gdb-linaro-7.2-2010.10-0/logs/armv7l-maverick-cbuild11-pavo1/gdb-testsuite.txt
while in the test run with the Maverick compiler, they fail:
http://ex.seabright.co.nz/build/gdb-linaro-7.2-2010.10-0/logs/armv7l-maverick-cbuild11-pavo1/gdb-maverick-testsuite.txt

summary: - gdb.mi/gdb792.exp failures
+ Handle -fstack-protector prologue code
Changed in gdb-linaro:
assignee: nobody → Yao Qi (yao-codesourcery)
Revision history for this message
Yao Qi (yao-codesourcery) wrote :
Changed in gdb-linaro:
status: Confirmed → In Progress
Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Patch for ARM is approved upstreams and committed. Will backport to Linaro tree.

Patch for i386 is submitted upstreams. http://sourceware.org/ml/gdb-patches/2010-12/msg00451.html

Changed in gdb-linaro:
status: In Progress → Fix Committed
tags: added: testsuite
Revision history for this message
Ulrich Weigand (uweigand) wrote :

These tests still fail for me on current Natty ... Investigating.

Revision history for this message
Ulrich Weigand (uweigand) wrote :

OK, there was an overly strict check in arm_skip_stack_protector that caused the fix to fail on my system.

Upstream fix checked in here:
http://sourceware.org/ml/gdb-patches/2011-02/msg00047.html

Fix also checked into Linaro GDB 7.2 for the 2011.02 release.

Michael Hope (michaelh1)
Changed in gdb-linaro:
milestone: none → 7.2-2011.02-0
Michael Hope (michaelh1)
Changed in gdb-linaro:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.