consumer: fix: possible unaligned access in packed structure
[lttng-tools.git] / src / common / consumer / consumer-timer.c
index 557d96b2935c4c8abbe43f9246e11fc4969b01f2..06c9f1a1e007e3c4d18b9e9fc55962d48329adf0 100644 (file)
@@ -711,6 +711,7 @@ void monitor_timer(struct lttng_consumer_local_data *ctx,
        sample_positions_cb sample;
        get_consumed_cb get_consumed;
        get_produced_cb get_produced;
+       uint64_t lowest = 0, highest = 0;
 
        assert(channel);
 
@@ -734,11 +735,13 @@ void monitor_timer(struct lttng_consumer_local_data *ctx,
                abort();
        }
 
-       ret = sample_channel_positions(channel, &msg.highest, &msg.lowest,
+       ret = sample_channel_positions(channel, &highest, &lowest,
                        sample, get_consumed, get_produced);
        if (ret) {
                return;
        }
+       msg.highest = highest;
+       msg.lowest = lowest;
 
        /*
         * Writes performed here are assumed to be atomic which is only
This page took 0.024571 seconds and 4 git commands to generate.