On 10/20/2015 03:43 AM, Konstantin Vladimirov wrote:
Hi,

--- sched-int.h ---

/* Information about the dependency.  */
struct _dep
{
....
   struct dep_replacement *replace;
....
};

typedef dep_def *dep_t;

--- sched-deps.c ---

static void
copy_dep (dep_t to, dep_t from)
{
   memcpy (to, from, sizeof (*to)); // oops?
}

This might be source of double free problems, etc. I can not build
exact reproduction for x86 or arm, but I stepped on it in scheduler
code for private backend. Is it worth filing as a bug, or is it part
of design?
I don't think it's by design. It'll certainly help if you can thoroughly describe the path by which you get the double-free.

Conceptually I agree with you, but I'd have to sit down with a debugger to really be sure.

Jeff

Reply via email to