Imported Upstream version 4.8.0.459

Former-commit-id: 2a5b9df2014f72665850c7f885e7aed54704a53a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-01-19 14:22:10 +00:00
parent a355c1b831
commit e5cd25ff4f
725 changed files with 1215 additions and 107650 deletions

View File

@@ -64,8 +64,8 @@ mono_write (BIO *bio, const char *in, int inl)
return mono->write_func (mono->instance, in, inl);
}
static int64_t
mono_ctrl (BIO *bio, int cmd, int64_t num, void *ptr)
static long
mono_ctrl (BIO *bio, int cmd, long num, void *ptr)
{
MonoBtlsBio *mono = (MonoBtlsBio *)bio->ptr;

View File

@@ -8,6 +8,12 @@
#include <btls-key.h>
MONO_API EVP_PKEY *
mono_btls_key_new ()
{
return EVP_PKEY_new ();
}
MONO_API void
mono_btls_key_free (EVP_PKEY *pkey)
{
@@ -32,6 +38,18 @@ mono_btls_key_is_rsa (EVP_PKEY *pkey)
return pkey->type == EVP_PKEY_RSA;
}
MONO_API int
mono_btls_key_assign_rsa_private_key (EVP_PKEY *pkey, uint8_t *der_data, int der_length)
{
RSA *rsa;
rsa = RSA_private_key_from_bytes (der_data, der_length);
if (!rsa)
return 0;
return EVP_PKEY_assign_RSA (pkey, rsa);
}
MONO_API int
mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int include_private_bits)
{
@@ -54,6 +72,8 @@ mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int includ
else
ret = RSA_public_key_to_bytes (buffer, &len, rsa);
RSA_free (rsa);
if (ret != 1)
return 0;

View File

@@ -13,6 +13,9 @@
#include <btls-ssl.h>
#include <btls-x509.h>
EVP_PKEY *
mono_btls_key_new ();
void
mono_btls_key_free (EVP_PKEY *pkey);
@@ -25,6 +28,9 @@ mono_btls_key_get_bits (EVP_PKEY *pkey);
int
mono_btls_key_is_rsa (EVP_PKEY *pkey);
int
mono_btls_key_assign_rsa_private_key (EVP_PKEY *pkey, uint8_t *der_data, int der_length);
int
mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int include_private_bits);

View File

@@ -36,36 +36,15 @@ THE SOFTWARE.
#include <time.h>
#include <errno.h>
/* Spec says except for stftime() and the _r() functions, these
all return static memory. Stabbings! */
static struct tm Static_Return_Date;
static char Static_Return_String[35];
static const int days_in_month[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
};
static const int julian_days_by_month[2][12] = {
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335},
};
static char const wday_name[7][3] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
static char const mon_name[12][3] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
static const int length_of_year[2] = { 365, 366 };
/* Some numbers relating to the gregorian cycle */
static const int64_t years_in_gregorian_cycle = 400;
#define days_in_gregorian_cycle ((365 * 400) + 100 - 4 + 1)
static const int64_t seconds_in_gregorian_cycle = days_in_gregorian_cycle * 60LL * 60LL * 24LL;
/* Year range we can trust the time funcitons with */
#define MAX_SAFE_YEAR 2037
@@ -74,28 +53,6 @@ static const int64_t seconds_in_gregorian_cycle = days_in_gregorian_cycle * 60LL
/* 28 year Julian calendar cycle */
#define SOLAR_CYCLE_LENGTH 28
/* Year cycle from MAX_SAFE_YEAR down. */
static const int safe_years_high[SOLAR_CYCLE_LENGTH] = {
2016, 2017, 2018, 2019,
2020, 2021, 2022, 2023,
2024, 2025, 2026, 2027,
2028, 2029, 2030, 2031,
2032, 2033, 2034, 2035,
2036, 2037, 2010, 2011,
2012, 2013, 2014, 2015
};
/* Year cycle from MIN_SAFE_YEAR up */
static const int safe_years_low[SOLAR_CYCLE_LENGTH] = {
1996, 1997, 1998, 1971,
1972, 1973, 1974, 1975,
1976, 1977, 1978, 1979,
1980, 1981, 1982, 1983,
1984, 1985, 1986, 1987,
1988, 1989, 1990, 1991,
1992, 1993, 1994, 1995,
};
/* Let's assume people are going to be looking for dates in the future.
Let's provide some cheats so you can skip ahead.
This has a 4x speed boost when near 2008.

View File

@@ -103,7 +103,7 @@ mono_btls_x509_lookup_mono_free (MonoBtlsX509LookupMono *mono)
}
static int
mono_lookup_ctrl (X509_LOOKUP *ctx, int cmd, const char *argp, int64_t argl, char **ret)
mono_lookup_ctrl (X509_LOOKUP *ctx, int cmd, const char *argp, long argl, char **ret)
{
MonoLookup *lookup = (MonoLookup*)ctx->method_data;
MonoBtlsX509LookupMono *mono = (MonoBtlsX509LookupMono*)argp;

View File

@@ -1803,6 +1803,11 @@ mono_domain_from_appdomain (MonoAppDomain *appdomain)
{
if (appdomain == NULL)
return NULL;
if (mono_object_is_transparent_proxy (&appdomain->mbr.obj)) {
MonoTransparentProxy *tp = (MonoTransparentProxy*)appdomain;
return mono_domain_get_by_id (tp->rp->target_domain_id);
}
return appdomain->data;
}

View File

@@ -1121,7 +1121,6 @@ typedef struct {
#ifdef DISABLE_REMOTING
#define mono_class_is_transparent_proxy(klass) (FALSE)
#define mono_class_is_real_proxy(klass) (FALSE)
#define mono_object_is_transparent_proxy(object) (FALSE)
#else
MonoRemoteClass*
mono_remote_class (MonoDomain *domain, MonoString *class_name, MonoClass *proxy_class, MonoError *error);
@@ -1131,9 +1130,10 @@ mono_install_remoting_trampoline (MonoRemotingTrampoline func);
#define mono_class_is_transparent_proxy(klass) ((klass) == mono_defaults.transparent_proxy_class)
#define mono_class_is_real_proxy(klass) ((klass) == mono_defaults.real_proxy_class)
#define mono_object_is_transparent_proxy(object) (((MonoObject*)object)->vtable->klass == mono_defaults.transparent_proxy_class)
#endif
#define mono_object_is_transparent_proxy(object) (mono_class_is_transparent_proxy (mono_object_class (object)))
#define GENERATE_GET_CLASS_WITH_CACHE_DECL(shortname) \
MonoClass* mono_class_get_##shortname##_class (void);

View File

@@ -103,10 +103,12 @@ ICALL(BTLS_ERROR_3, "mono_btls_error_get_error_string_n", mono_btls_error_get_er
ICALL(BTLS_ERROR_4, "mono_btls_error_peek_error", mono_btls_error_peek_error)
ICALL_TYPE(BTLS_KEY, "Mono.Btls.MonoBtlsKey", BTLS_KEY_1)
ICALL(BTLS_KEY_0, "mono_btls_key_assign_rsa_private_key", mono_btls_key_assign_rsa_private_key)
ICALL(BTLS_KEY_1, "mono_btls_key_free", mono_btls_key_free)
ICALL(BTLS_KEY_2, "mono_btls_key_get_bits", mono_btls_key_get_bits)
ICALL(BTLS_KEY_3, "mono_btls_key_get_bytes", mono_btls_key_get_bytes)
ICALL(BTLS_KEY_4, "mono_btls_key_is_rsa", mono_btls_key_is_rsa)
ICALL(BTLS_KEY_4a, "mono_btls_key_new", mono_btls_key_new)
ICALL(BTLS_KEY_5, "mono_btls_key_up_ref", mono_btls_key_up_ref)
ICALL_TYPE(BTLS_OBJECT, "Mono.Btls.MonoBtlsObject", BTLS_OBJECT_1)

View File

@@ -464,7 +464,9 @@ common_sources = \
alias-analysis.c \
mini-cross-helpers.c \
arch-stubs.c \
llvm-runtime.h
llvm-runtime.h \
lldb.h \
lldb.c
test_sources = \
basic-calls.cs \
@@ -859,7 +861,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.8.0.429/9e8f0ee\"" > version.h
echo "#define FULL_VERSION \"Stable 4.8.0.459/cd26828\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -464,7 +464,9 @@ common_sources = \
alias-analysis.c \
mini-cross-helpers.c \
arch-stubs.c \
llvm-runtime.h
llvm-runtime.h \
lldb.h \
lldb.c
test_sources = \
basic-calls.cs \
@@ -859,7 +861,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.8.0.429/9e8f0ee\"" > version.h
echo "#define FULL_VERSION \"Stable 4.8.0.459/cd26828\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -1 +1 @@
5ff36176892c10b6cb3adc4f7c2e395fd1d81b3a
2009d30f4c7c81d73738eea5151254163a75de36

View File

@@ -1 +1 @@
14bc01ca5a1c785611092113ce9726193bb24fd9
6dca377cb02fbc8588f0c3c97690bde945b3a67c

686
mono/mini/lldb.c Normal file

File diff suppressed because it is too large Load Diff

17
mono/mini/lldb.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef __MONO_XDEBUG_LLDB_H__
#define __MONO_XDEBUG_LLDB_H__
#include "config.h"
#include "mini.h"
void mono_lldb_init (const char *options);
void mono_lldb_save_method_info (MonoCompile *cfg);
void mono_lldb_save_trampoline_info (MonoTrampInfo *info);
void mono_lldb_remove_method (MonoDomain *domain, MonoMethod *method, MonoJitDynamicMethodInfo *info);
void mono_lldb_save_specific_trampoline_info (gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, gpointer code, guint32 code_len);
#endif

View File

@@ -1 +1 @@
8222f550fb89866ac7929f17f2da8d18cf191f4d
4315e54a75e1cc6c0225588888f30e31a9510a02

View File

@@ -18,6 +18,7 @@
#include <mono/utils/mono-threads-coop.h>
#include "mini.h"
#include "lldb.h"
/*
* Address of the trampoline code. This is used by the debugger to check
@@ -1436,10 +1437,17 @@ mono_get_trampoline_code (MonoTrampolineType tramp_type)
gpointer
mono_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, guint32 *code_len)
{
gpointer code;
guint32 len;
if (mono_aot_only)
return mono_aot_create_specific_trampoline (mono_defaults.corlib, arg1, tramp_type, domain, code_len);
code = mono_aot_create_specific_trampoline (mono_defaults.corlib, arg1, tramp_type, domain, &len);
else
return mono_arch_create_specific_trampoline (arg1, tramp_type, domain, code_len);
code = mono_arch_create_specific_trampoline (arg1, tramp_type, domain, &len);
mono_lldb_save_specific_trampoline_info (arg1, tramp_type, domain, code, len);
if (code_len)
*code_len = len;
return code;
}
gpointer

View File

@@ -1 +1 @@
26248fcce4cc078e80f5b273afc760876290f922
8f2ef218cc4e9047676a88b73fef6c609e45b6fd

View File

@@ -1 +1 @@
d5708a12125a5eb71fbc4b6a8acf8209bf6561ca
1ea5c6a51368dbeb3f9c8e227208b0eaf74d76cf

View File

@@ -80,13 +80,17 @@ static int map_hw_reg_to_dwarf_reg [] = { 0, 1, 2, 3, 5, 4, 6, 7, 8 };
#define DWARF_PC_REG (mono_hw_reg_to_dwarf_reg (X86_NREG))
#elif defined (TARGET_POWERPC)
// http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html
static int map_hw_reg_to_dwarf_reg [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8,
static int map_hw_reg_to_dwarf_reg [ppc_lr + 1] = { 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31 };
#define NUM_DWARF_REGS 110
#define DWARF_DATA_ALIGN (-(gint32)sizeof (mgreg_t))
#if _CALL_ELF == 2
#define DWARF_PC_REG 65
#else
#define DWARF_PC_REG 108
#endif
#define NUM_DWARF_REGS (DWARF_PC_REG + 1)
#elif defined (TARGET_S390X)
static int map_hw_reg_to_dwarf_reg [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
#define NUM_DWARF_REGS 16
@@ -117,9 +121,20 @@ static int map_hw_reg_to_dwarf_reg [16];
#endif
static gboolean dwarf_reg_to_hw_reg_inited;
static gboolean hw_reg_to_dwarf_reg_inited;
static int map_dwarf_reg_to_hw_reg [NUM_DWARF_REGS];
static void
init_hw_reg_map (void)
{
#ifdef TARGET_POWERPC
map_hw_reg_to_dwarf_reg [ppc_lr] = DWARF_PC_REG;
#endif
mono_memory_barrier ();
hw_reg_to_dwarf_reg_inited = TRUE;
}
/*
* mono_hw_reg_to_dwarf_reg:
*
@@ -128,12 +143,8 @@ static int map_dwarf_reg_to_hw_reg [NUM_DWARF_REGS];
int
mono_hw_reg_to_dwarf_reg (int reg)
{
#ifdef TARGET_POWERPC
if (reg == ppc_lr)
return 108;
else
g_assert (reg < NUM_HW_REGS);
#endif
if (!hw_reg_to_dwarf_reg_inited)
init_hw_reg_map ();
if (NUM_HW_REGS == 0) {
g_assert_not_reached ();
@@ -144,7 +155,7 @@ mono_hw_reg_to_dwarf_reg (int reg)
}
static void
init_reg_map (void)
init_dwarf_reg_map (void)
{
int i;
@@ -153,10 +164,6 @@ init_reg_map (void)
map_dwarf_reg_to_hw_reg [mono_hw_reg_to_dwarf_reg (i)] = i;
}
#ifdef TARGET_POWERPC
map_dwarf_reg_to_hw_reg [DWARF_PC_REG] = ppc_lr;
#endif
mono_memory_barrier ();
dwarf_reg_to_hw_reg_inited = TRUE;
}
@@ -165,7 +172,7 @@ int
mono_dwarf_reg_to_hw_reg (int reg)
{
if (!dwarf_reg_to_hw_reg_inited)
init_reg_map ();
init_dwarf_reg_map ();
return map_dwarf_reg_to_hw_reg [reg];
}

View File

@@ -1 +1 @@
#define FULL_VERSION "Stable 4.8.0.429/9e8f0ee"
#define FULL_VERSION "Stable 4.8.0.459/cd26828"

Some files were not shown because too many files have changed in this diff Show More