Skip to content
Snippets Groups Projects
Commit 70857ec8 authored by Axel Naumann's avatar Axel Naumann
Browse files

The heap-allocated trampoline functions were cut off on some platforms because...

The heap-allocated trampoline functions were cut off on some platforms because the fSize evaluation was underestimating the function's length. Increasing the estimate solves that.
Use R__B64 instead of INT_MAX < LONG_MAX which is problematic for MacOS.


git-svn-id: http://root.cern.ch/svn/root/trunk@31989 27541ba8-7e3a-0410-8455-c3a389f83636
parent 4ecf72e9
Branches
Tags
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "CINTdefs.h" #include "CINTdefs.h"
#include "Api.h" #include "Api.h"
#include "CINTFunctional.h" #include "CINTFunctional.h"
#include "RConfig.h"
#ifdef __linux #ifdef __linux
#include <sys/mman.h> #include <sys/mman.h>
...@@ -397,7 +398,7 @@ namespace ROOT { namespace Cintex { ...@@ -397,7 +398,7 @@ namespace ROOT { namespace Cintex {
} }
//------ Function models------------------------------------------------------------------- //------ Function models-------------------------------------------------------------------
#if INT_MAX < LONG_MAX #ifdef R__B64
#define FUNCPATTERN 0xFAFAFAFAFAFAFAFAL #define FUNCPATTERN 0xFAFAFAFAFAFAFAFAL
#define DATAPATTERN 0xDADADADADADADADAL #define DATAPATTERN 0xDADADADADADADADAL
#else #else
...@@ -428,7 +429,7 @@ namespace ROOT { namespace Cintex { ...@@ -428,7 +429,7 @@ namespace ROOT { namespace Cintex {
if ( *(size_t*)b == DATAPATTERN ) fa_offset = o; if ( *(size_t*)b == DATAPATTERN ) fa_offset = o;
if ( *(size_t*)b == FUNCPATTERN ) f_offset = o; if ( *(size_t*)b == FUNCPATTERN ) f_offset = o;
if ( f_offset && fa_offset ) { if ( f_offset && fa_offset ) {
fSize = (o + 32) & ~0xF; fSize = (o + 256) & ~0xF;
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment