[lttng-dev] session.id unsigned int vs. uint64_t
David Goulet
dgoulet at efficios.com
Thu Jul 4 15:56:45 EDT 2013
Good catch!
This is now fixed in master and stable-2.2!
Thanks!
David
Thibault, Daniel:
> ~~~~~~src/bin/lttng-sessiond/session.h:60:
>
> struct ltt_session {
> ...
> unsigned int id;
>
> ~~~~~~src/bin/lttng-sessiond/trace-ust.c:185:
>
> struct ltt_ust_session *trace_ust_create_session(uint64_t session_id)
>
> ~~~~~~src/bin/lttng-sessiond/main.c:2352:
>
> static int create_ust_session(struct ltt_session *session,
> struct lttng_domain *domain)
> {
> ...
> lus = trace_ust_create_session(session->id);
>
> ~~~~~~src/bin/lttng-sessiond/trace-ust.h:
>
> #ifdef HAVE_LIBLTTNG_UST_CTL
> ...
> struct ltt_ust_session *trace_ust_create_session(uint64_t session_id);
> ...
> #else /* HAVE_LIBLTTNG_UST_CTL */
> ...
> static inline
> struct ltt_ust_session *trace_ust_create_session(unsigned int session_id)
>
>
> 32-bit-wide unsigned ints and 64-bit-wide uint64_ts are not truly interchangeable. The ltt_session.id should be widened to uint64_t.
>
> Daniel U. Thibault
> Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
> Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
> R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
> 2459 route de la Bravoure
> Québec QC G3J 1X5
> CANADA
> Vox : (418) 844-4000 x4245
> Fax : (418) 844-4538
> NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
> Gouvernement du Canada | Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
More information about the lttng-dev
mailing list