Synfig Issue Tracker
Please log in to bookmark issues
OPEN  Bug report #69  -  Incorrect use of pipe system call
Posted Dec 16, 2012 - updated Jan 05, 2019
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
    Not assigned to anyone
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Imported User
  • Owned by
    Not owned by anyone
  • Category
    Not determined
  • Resolution
    Not determined
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • Tags
    icon_customdatatype.png Not determined
  • Difficulty
    icon_customdatatype.png Easy
Issue description
Gerco Ballintijn:

In src/synfig/render.cpp (line 338) the pipe() system call is used incorrectly. The pipe() call uses with two adjacent local integer variables instead of the required single array of 2 integers. It currently works, but is not guaranteed to work.
Steps to reproduce this issue
Nothing entered.

Comment posted by
Jul 22, 15:48
Incorrect code is now in line 451.

Seems very easy to correct and maybe will give some stability for win32 platform. It's present in between a preprocessor win32 condition i my case, i can't resolve, i don't have this platform.
Comment posted by
 Charlie Murphy
Dec 31, 23:09
If the pipe() call you pointed out is the same call at 488, this is a good usage. At first glance it looks wrong, because pipe_read and pipe_write are separate integers. However, they are adjacent in memory since they are inside a struct. They can be used as a two-element array. edit: rewording
Comment posted by
 galvin hery
May 20, 03:58
Yes! They can be used as a two element array cookie clicker
Comment posted by
 galvin hery
May 20, 03:58

Comment posted by
 galvin hery
May 20, 03:59
Comment posted by
 galvin hery
May 20, 04:00
Comment posted by
Aug 10, 09:07
Since pipe_read and pipe_write are two different numbers slope, it seems odd at first. Since they are a part of the same struct, though, they share the same physical memory space. They may serve as a simple array of two elements.