From f7c6fc9d1feb886a53a99bef9edb7ae49946ba99 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Thu, 7 May 2015 21:53:38 +0100 Subject: [PATCH 1/2] Restore check_thunks error message. --- public/asm/asm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/asm/asm.c b/public/asm/asm.c index dff7be12..da447479 100644 --- a/public/asm/asm.c +++ b/public/asm/asm.c @@ -4,6 +4,8 @@ #define _GNU_SOURCE #include #include +#include +#include #define REG_EAX 0 #define REG_ECX 1 @@ -23,9 +25,7 @@ */ void check_thunks(unsigned char *dest, unsigned char *pc) { -#if defined WIN32 - return; -#else +#ifndef WIN32 /* Step write address back 4 to the start of the function address */ unsigned char *writeaddr = dest - 4; unsigned char *calloffset = *(unsigned char **)writeaddr; @@ -62,6 +62,10 @@ void check_thunks(unsigned char *dest, unsigned char *pc) } default: { + printf("Unknown thunk: %c\n", *(calladdr+1)); +#ifndef NDEBUG + abort(); +#endif break; } } @@ -78,8 +82,6 @@ void check_thunks(unsigned char *dest, unsigned char *pc) *(void **)writeaddr = (void *)pc; writeaddr += 4; } - - return; #endif } From 1b47b68cc7f8ce27d5813f69f7e91b02de4e43fd Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Sat, 9 May 2015 11:57:49 +0100 Subject: [PATCH 2/2] Correct NameHashSet::add() return type. --- public/sm_namehashset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sm_namehashset.h b/public/sm_namehashset.h index 5b169d07..5e6fbe95 100644 --- a/public/sm_namehashset.h +++ b/public/sm_namehashset.h @@ -120,7 +120,7 @@ public: } template - void add(Insert &i, U &&value) + bool add(Insert &i, U &&value) { return table_.add(i, ke::Forward(value)); }