Commit 96903554 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add an extra marker to libunwind so that pyston can ensure it's running on a...

Add an extra marker to libunwind so that pyston can ensure it's running on a patched libunwind version
parent ac004e74
From 8f7bde85e4f9ce497e18b23a8c4fb3f9e0f2fb12 Mon Sep 17 00:00:00 2001
From: Kevin Modzelewski <kevmod@gmail.com>
Date: Mon, 21 Apr 2014 19:37:04 -0700
From e1d7c78d95e4b73a311f10149d0a54547d307d5d Mon Sep 17 00:00:00 2001
From: Kevin Modzelewski <kmod@dropbox.com>
Date: Tue, 22 Apr 2014 15:50:40 -0700
Subject: [PATCH] Change the RBP-validation heuristic to allow size-0 call frames
---
src/x86_64/Gstep.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
include/libunwind.h | 3 +++
src/x86_64/Gstep.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/libunwind.h b/include/libunwind.h
index d11c823..d9a5f03 100644
--- a/include/libunwind.h
+++ b/include/libunwind.h
@@ -30,3 +30,6 @@
# include "libunwind-x86_64.h"
#endif /* UNW_REMOTE_ONLY */
+
+#define LIBUNWIND_PYSTON_PATCH_VERSION 0x01
+
diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c
index 9fa0967..809d60b 100644
--- a/src/x86_64/Gstep.c
......
......@@ -16,9 +16,6 @@
#include <cstdio>
#include <cstdlib>
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#include "core/common.h"
#include "core/types.h"
......
......@@ -30,6 +30,12 @@
#include "gc/heap.h"
#include "gc/root_finder.h"
#ifndef LIBUNWIND_PYSTON_PATCH_VERSION
#error "Please use a patched version of libunwind; see docs/INSTALLING.md"
#elif LIBUNWIND_PYSTON_PATCH_VERSION != 0x01
#error "Please repatch your version of libunwind; see docs/INSTALLING.md"
#endif
extern "C" void __libc_start_main();
namespace pyston {
......
......@@ -15,6 +15,12 @@
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#ifndef LIBUNWIND_PYSTON_PATCH_VERSION
#error "Please use a patched version of libunwind; see docs/INSTALLING.md"
#elif LIBUNWIND_PYSTON_PATCH_VERSION != 0x01
#error "Please repatch your version of libunwind; see docs/INSTALLING.md"
#endif
#include "core/options.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment