Bug #135

Documentation should mention that lttng_event must be initialized to 0 to use the default values

Added by Raphaël Beamonte over 8 years ago. Updated over 8 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


If we do not initialize the struct lttng_event to 0, the lttng sessiond might return a fatal error when executing (if the value of the loglevel_type is set to an unknown value).
Documentation should mention that we can (have to ?) initialize to 0 the structure with :

struct lttng_event event = {0};


struct lttng_event event;
memset(&event, 0, sizeof(struct lttng_event)));


Updated by David Goulet over 8 years ago

  • Status changed from New to Confirmed
  • Assignee set to Raphaël Beamonte

This is actually safer since this data is passed over the network and zero is "normally" uninitialized values.

However, the lttng ctl API enable-even should check mandatory field before sending it back to the session daemon and as of today, the loglevel check is not there.

Feel free to send a patch for developer documentation and loglevel check in liblttng-ctl enable-event call.


Updated by Yannick Brosseau over 8 years ago

Should mention that all struct should be initialized to zéro before use


Updated by Anonymous over 8 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF