Skip to content

Commit 4f8cae8

Browse files
committed
[trace] Remove trace event from internal_dispatch_function
- The reason behind is because it might contain sensitive data - Modify test that checks the number of expected logs from guest Signed-off-by: Doru Blânzeanu <dblnz@pm.me>
1 parent dadb693 commit 4f8cae8

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/hyperlight_common/src/flatbuffer_wrappers/function_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub enum FunctionCallType {
4141
}
4242

4343
/// `Functioncall` represents a call to a function in the guest or host.
44-
#[derive(Clone, Debug)]
44+
#[derive(Clone)]
4545
pub struct FunctionCall {
4646
/// The function name
4747
pub function_name: String,

src/hyperlight_guest_bin/src/guest_function/call.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ pub(crate) fn internal_dispatch_function() {
9191
.try_pop_shared_input_data_into::<FunctionCall>()
9292
.expect("Function call deserialization failed");
9393

94-
#[cfg(debug_assertions)]
95-
tracing::trace!("{:?}", function_call);
96-
9794
let res = call_guest_function(function_call);
9895

9996
match res {

src/hyperlight_host/tests/integration_test.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -744,14 +744,10 @@ fn log_message() {
744744
// - internal_dispatch_function does a log::trace! in debug mode
745745
// - logs from trace level tracing spans created as logs because of the tracing `log` feature
746746
// - 4 from evolve call (hyperlight_main + halt)
747-
// - 8 from guest call (internal_dispatch_function + others)
747+
// - 7 from guest call
748748
// and are multiplied because we make 6 calls to `log_test_messages`
749749
// NOTE: These numbers need to be updated if log messages or spans are added/removed
750-
let num_fixed_trace_log = if cfg!(debug_assertions) {
751-
(1 + 12) * 6
752-
} else {
753-
12 * 6
754-
};
750+
let num_fixed_trace_log = 12 * 6;
755751

756752
let tests = vec![
757753
(LevelFilter::Trace, 5 + num_fixed_trace_log),

0 commit comments

Comments
 (0)