largest_align = 1; /* must be non-zero for ltt_align */
data_size = ltt_get_data_size(&closure, serialize_private,
&largest_align, fmt, &args_copy);
+ largest_align = min_t(int, largest_align, sizeof(void *));
va_end(args_copy);
/* Iterate on each trace */
#define LTT_DEFAULT_N_SUBBUFS_HIGH 2
#define LTT_TRACER_MAGIC_NUMBER 0x00D6B7ED
#define LTT_TRACER_VERSION_MAJOR 2
-#define LTT_TRACER_VERSION_MINOR 5
+#define LTT_TRACER_VERSION_MINOR 6
/**
* ust_write_trace_header - Write trace header
*/
static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type)
{
- return (size_of_type - align_drift) & (size_of_type - 1);
+ size_t alignment = min(sizeof(void *), size_of_type);
+ return (alignment - align_drift) & (alignment - 1);
}
/* Default arch alignment */
#define LTT_ALIGN