diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-07-22 00:01:03 +0200 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-07-22 00:01:03 +0200 |
commit | dcd27ddf875d6b913f1ddb0573c22b0931e36061 (patch) | |
tree | 8e066752bb3e2cad0a86676a6a7ca17b0d73172d /bfd/configure.ac | |
parent | 82c780662512c53c3a2c7f1e1f66474ea6bc04bd (diff) | |
download | gdb-dcd27ddf875d6b913f1ddb0573c22b0931e36061.zip gdb-dcd27ddf875d6b913f1ddb0573c22b0931e36061.tar.gz gdb-dcd27ddf875d6b913f1ddb0573c22b0931e36061.tar.bz2 |
gdb.python/py-unwind: Disable stack protection
[I made some typo fixes but forgot to amend my commit before sending the patch,
hence this v2.]
I see the following failure on Ubuntu 16.04's gcc 5.4.0:
Running /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.python/py-unwind.exp ...
FAIL: gdb.python/py-unwind.exp: continue to breakpoint: break backtrace-broken
FAIL: gdb.python/py-unwind.exp: Backtrace restored by unwinder (pattern 1)
The problem is that the test expects a very particular stack layout.
When stack protection is enabled, it adds a canary value which looks
like an additional local variable. This makes the test complain about
a bad stack layout and fail.
The simple solution is to disable stack protection for that test using
-fno-stack-protector. I checked older compilers (gcc 4.4, clang 3.5)
and they support that flag, so I don't think it's necessary to probe for
whether the compiler supports it.
Maybe a better solution would be to change the test to make it cope with
different stack layouts (perhaps it could save addresses of stuff in
some global variables which GDB/the unwinder would read). I'll go with
the simple solution for now though.
gdb/testsuite/ChangeLog:
* gdb.python/py-unwind.exp: Disable stack protection when
building test file.
Diffstat (limited to 'bfd/configure.ac')
0 files changed, 0 insertions, 0 deletions