[lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
bitfield.h uses the left shift operator with a left operand which may be negative. The C99 standard states that shifting a negative value is undefined. When building with -Wshift-negative-value, we get this gcc warning: In file included from /home/smarchi/src/babeltrace/include/babeltrace/ctfser

Re: [lttng-dev] [PATCH babeltrace] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
- On May 7, 2019, at 6:13 PM, Simon Marchi sim...@simark.ca wrote: > On 2019-05-07 4:40 p.m., Mathieu Desnoyers wrote: >> bitfield.h uses the left shift operator with a left operand which >> may be negative. The C99 standard states that shifting a negative >> value is undefined. Hi Simon, Th

Re: [lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Simon Marchi
On 2019-05-08 10:39 a.m., Mathieu Desnoyers wrote: > bitfield.h uses the left shift operator with a left operand which > may be negative. The C99 standard states that shifting a negative > value is undefined. > > When building with -Wshift-negative-value, we get this gcc warning: > > In file incl

Re: [lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
- On May 8, 2019, at 11:49 AM, Simon Marchi sim...@simark.ca wrote: > On 2019-05-08 10:39 a.m., Mathieu Desnoyers wrote: >> bitfield.h uses the left shift operator with a left operand which >> may be negative. The C99 standard states that shifting a negative >> value is undefined. >> >> When

Re: [lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Simon Marchi
On 2019-05-08 11:59 a.m., Mathieu Desnoyers wrote: > What compiler do you use, and which compilation flags ? > (it works here) "gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0", which is the system compiler on Ubuntu 18.04. I just built with ./configure 'CFLAGS=-g3 -O0 -fsanitize=address -Wall' and

Re: [lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
- On May 8, 2019, at 12:08 PM, Simon Marchi simon.mar...@efficios.com wrote: > On 2019-05-08 11:59 a.m., Mathieu Desnoyers wrote: >> What compiler do you use, and which compilation flags ? >> (it works here) > > "gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0", which is the system compiler on > Ubun

Re: [lttng-dev] default sub-buf size and count

2019-05-08 Thread Jonathan Rajotte-Julien
Hi, On Tue, May 07, 2019 at 05:08:33PM -0400, Mosleh Uddin wrote: > Hello, > > I was just wondering what the default values for the sub-buffer size and > the number of sub-buffers are. I attempted to print them out after setting > the channel with default attr, however both values appear 0. This

[lttng-dev] [PATCH babeltrace v3] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
bitfield.h uses the left shift operator with a left operand which may be negative. The C99 standard states that shifting a negative value is undefined. When building with -Wshift-negative-value, we get this gcc warning: In file included from /home/smarchi/src/babeltrace/include/babeltrace/ctfser