Skip to content
Snippets Groups Projects
Commit 2727be6c authored by Kostyantyn Vorobyov's avatar Kostyantyn Vorobyov
Browse files

Track main function

parent 3ca721e9
No related branches found
No related tags found
No related merge requests found
......@@ -160,6 +160,8 @@ static void argv_alloca(int *argc_ref, char *** argv_ref) {
/* }}} */
/* Program initialization {{{ */
extern int main(void);
static void memory_init(int *argc_ref, char *** argv_ref, size_t ptr_size) {
describe_run();
/** Verify that the given size of a pointer matches the one in the present
......@@ -178,6 +180,9 @@ static void memory_init(int *argc_ref, char *** argv_ref, size_t ptr_size) {
/* Track program arguments. */
if (argc_ref && argv_ref)
argv_alloca(argc_ref, argv_ref);
/* Track main function */
shadow_alloca(&main, sizeof(&main));
initialize_static_region((uintptr_t)&main, sizeof(&main));
/* Tracking safe locations */
collect_safe_locations();
int i;
......
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