Skip to content

Commit

Permalink
Fix: liblttng-ctl: non-packed structure used for tracker serialization
Browse files Browse the repository at this point in the history
Using unpacked structures in liblttng-ctl's protocol can cause issues
when mixing sessiond and client of different bitness. In this specific
case I doubt it causes a problem, but it could rightfully do on some
architectures.

Signed-off-by: Jérémie Galarneau <[email protected]>
Change-Id: Ie17096a55a4b7508c604e184cae877b83df6e451
  • Loading branch information
jgalar committed Apr 14, 2022
1 parent 9016dbf commit 2d7da30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

struct process_attr_tracker_values_comm_header {
uint32_t count;
};
} LTTNG_PACKED;

struct process_attr_tracker_value_comm {
/* enum lttng_process_attr_value_type */
Expand All @@ -32,7 +32,7 @@ struct process_attr_tracker_value_comm {
/* Includes the '\0' terminator. */
uint32_t name_len;
} value;
};
} LTTNG_PACKED;

#define GET_INTEGRAL_COMM_VALUE(value_ptr, as_type) \
((as_type)(std::is_signed<as_type>::value ? (value_ptr)->u._signed : \
Expand Down

0 comments on commit 2d7da30

Please sign in to comment.