• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch
Max FilippovMax Filippov committed e602c97f0b618 Aug 2015
Raw file
Source viewDiff to previous
 
1
From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001
2
From: Max Filippov <jcmvbkbc@gmail.com>
3
Date: Sat, 15 Aug 2015 05:12:11 +0300
4
Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
5
​
6
Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
7
higher than what was actually used by code at context->ra. This results
8
in invalid CFA value in signal frames and premature unwinding completion
9
in forced unwinding used by uClibc NPTL thread cancellation.
10
Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
11
matching code that used them.
12
​
13
2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>
14
libgcc/
15
    * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
16
    context->sp instead of context->cfa.
17
​
18
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
19
---
20
Backported from: r226964
21
​
22
 libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
23
 1 file changed, 1 insertion(+), 1 deletion(-)
24
​
25
diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c
26
index 35f7797..ef6b900 100644
27
--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
28
+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
29
@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
30
 _Unwind_Word
31
 _Unwind_GetCFA (struct _Unwind_Context *context)
32
 {
33
-  return (_Unwind_Ptr) context->cfa;
34
+  return (_Unwind_Ptr) context->sp;
35
 }
36
 
37
 /* Overwrite the saved value for register INDEX in CONTEXT with VAL.  */
38
-- 
39
1.8.1.4
40
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.