This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2


On Wed, Mar 16 2016, Marcin KoÅcielnicki wrote:

> On 16/03/16 19:54, Andreas Arnez wrote:
>> This patch added handling for some syscalls to linux-record.c:
>>
>>    https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html
>>
>> But for both `pipe' and `pipe2' the patch lacks a statement after an
>> `if', such that the following `break' is interpreted as the `if'-body
>> instead.
>>
>> This adds the missing (return-) statements for the conditionals.
>
> Whoops, my bad.  This looks like obvious patch material.  Though I
> wonder why it wasn't detected earlier by someone running GCC 6 with
> its -Wmisleading-indentation warning - does it not catch it?

Right, it doesn't catch it (yet):

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66298

> Btw, it seems that cases gdb_sys_pipe2 and gdb_sys_pipe could be
> squashed into one.

Right, and a few other cases could be squashed as well.  Mabye I'll post
another patch for that...

--
Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]