|
|
@ -359,7 +359,8 @@ current_sandbox_main(void)
|
|
|
|
sandbox_setup_arguments(sandbox);
|
|
|
|
sandbox_setup_arguments(sandbox);
|
|
|
|
|
|
|
|
|
|
|
|
/* Executing the function */
|
|
|
|
/* Executing the function */
|
|
|
|
sandbox->return_value = module_main(current_module, argument_count, sandbox->arguments_offset);
|
|
|
|
sandbox->return_value = module_main(current_module, argument_count, sandbox->arguments_offset);
|
|
|
|
|
|
|
|
sandbox->completion_timestamp = __getcycles();
|
|
|
|
|
|
|
|
|
|
|
|
/* Retrieve the result, construct the HTTP response, and send to client */
|
|
|
|
/* Retrieve the result, construct the HTTP response, and send to client */
|
|
|
|
rc = sandbox_build_and_send_client_response(sandbox);
|
|
|
|
rc = sandbox_build_and_send_client_response(sandbox);
|
|
|
@ -368,6 +369,8 @@ current_sandbox_main(void)
|
|
|
|
goto err;
|
|
|
|
goto err;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sandbox->response_timestamp = __getcycles();
|
|
|
|
|
|
|
|
|
|
|
|
done:
|
|
|
|
done:
|
|
|
|
/* Cleanup connection and exit sandbox */
|
|
|
|
/* Cleanup connection and exit sandbox */
|
|
|
|
sandbox_close_http(sandbox);
|
|
|
|
sandbox_close_http(sandbox);
|
|
|
@ -480,6 +483,7 @@ sandbox_allocate(struct sandbox_request *sandbox_request)
|
|
|
|
|
|
|
|
|
|
|
|
struct sandbox *sandbox;
|
|
|
|
struct sandbox *sandbox;
|
|
|
|
char * error_message = "";
|
|
|
|
char * error_message = "";
|
|
|
|
|
|
|
|
uint64_t now = __getcycles();
|
|
|
|
|
|
|
|
|
|
|
|
/* Allocate Sandbox control structures, buffers, and linear memory in a 4GB address space */
|
|
|
|
/* Allocate Sandbox control structures, buffers, and linear memory in a 4GB address space */
|
|
|
|
sandbox = sandbox_allocate_memory(sandbox_request->module);
|
|
|
|
sandbox = sandbox_allocate_memory(sandbox_request->module);
|
|
|
@ -488,6 +492,8 @@ sandbox_allocate(struct sandbox_request *sandbox_request)
|
|
|
|
goto err_memory_allocation_failed;
|
|
|
|
goto err_memory_allocation_failed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sandbox->allocation_timestamp = now;
|
|
|
|
|
|
|
|
|
|
|
|
/* Set state to initializing */
|
|
|
|
/* Set state to initializing */
|
|
|
|
sandbox->state = SANDBOX_UNINITIALIZED;
|
|
|
|
sandbox->state = SANDBOX_UNINITIALIZED;
|
|
|
|
|
|
|
|
|
|
|
|