Skip to content
Snippets Groups Projects
Commit 95158633 authored by jdh8d's avatar jdh8d
Browse files

Fix to properly build emt in build-all, but only once during fresh checkouts...

Fix to properly build emt in build-all, but only once during fresh checkouts (as otherwise it's way too slow).  Re-release of broken package.  Fix to p1 to deal with doubling the size of huge stack frames (only does it above 32kb now).  Fix to VGT to mimic the input packages atd.class setting perfectly (omitted if omitted in the input package).  enabled polls for AWS.

Former-commit-id: 325eadd093e44d23538fd6a639ff187f80ee72d7
parent 936fabdc
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,7 @@ enum
RECURSIVE_MIN_STACK_PAD_OPTION,
RECURSIVE_MAX_STACK_PAD_OPTION,
SHOULD_DOUBLE_FRAME_SIZE_OPTION,
DOUBLE_THRESHOLD_OPTION,
SELECTIVE_CANARIES_OPTION,
SET_RANDOM_SEED,
SET_CANARY_VALUE,
......@@ -98,6 +99,7 @@ static struct option const long_options[] =
{"recursive_min_stack_padding",required_argument, NULL, RECURSIVE_MIN_STACK_PAD_OPTION},
{"recursive_max_stack_padding",required_argument, NULL, RECURSIVE_MAX_STACK_PAD_OPTION},
{"should_double_frame_size",required_argument, NULL, SHOULD_DOUBLE_FRAME_SIZE_OPTION},
{"double_threshold_size",required_argument, NULL, DOUBLE_THRESHOLD_OPTION,},
{"selective_canaries",required_argument, NULL, SELECTIVE_CANARIES_OPTION},
{"random_seed",required_argument, NULL, SET_RANDOM_SEED},
{"canary_value",required_argument, NULL, SET_CANARY_VALUE},
......@@ -337,6 +339,13 @@ int main(int argc, char **argv)
pn_options->setRecursiveMaxStackPadding(recursive_max_stack_padding);
break;
}
case DOUBLE_THRESHOLD_OPTION:
{
const auto double_threshold = atoi(optarg);
pn_options->setDoubleThreshold(double_threshold);
break;
}
case SHOULD_DOUBLE_FRAME_SIZE_OPTION:
{
if(strcasecmp("true",optarg)==0)
......
......@@ -85,7 +85,7 @@ unsigned int PNStackLayout::GetRandomPadding(unsigned int obj_size)
if(pn_options->getShouldDoubleFrameSize())
if(pn_options->getShouldDoubleFrameSize() && obj_size < pn_options->getDoubleThreshold())
{
//if the original frame size is not aligned, then add as many bytes as necessary to align it
//for example, if 3 bytes over alignment, and the alignment stride is 8, then add 8 - 3, or 5 bytes.
......
......@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <limits.h>
......@@ -47,6 +48,7 @@ class PNOptions
random_seed=getpid();
canary_value=0;
canary_value_inited=false;
double_threshold=32*1024; // 32kb
}
void setMinStackPadding(int val) { min_stack_padding = val; }
......@@ -56,12 +58,14 @@ class PNOptions
void setShouldDoubleFrameSize(bool val) { should_double_frame_size = val; }
void setRandomSeed(int val) { random_seed = val; }
void setCanaryValue(int val) { canary_value = val; canary_value_inited=true; }
void setDoubleThreshold(int val) { double_threshold = val; }
int getMinStackPadding() const { return min_stack_padding; }
int getMaxStackPadding() const { return max_stack_padding; }
int getRecursiveMinStackPadding() const { return recursive_min_stack_padding; }
int getRecursiveMaxStackPadding() const { return recursive_max_stack_padding; }
bool getShouldDoubleFrameSize() const { return should_double_frame_size; }
int getDoubleThreshold() { return double_threshold; }
int getRandomSeed() { return random_seed; }
int getCanaryValue()
{
......@@ -99,6 +103,8 @@ class PNOptions
int canary_value;
bool canary_value_inited;
int double_threshold;
std::set<std::string> canary_functions;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment