This is the mail archive of the
mailing list for the GCC project.
Re: Shallow copy error in scheduler deps?
- From: Jeff Law <law at redhat dot com>
- To: Konstantin Vladimirov <konstantin dot vladimirov at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 20 Oct 2015 09:09:52 -0600
- Subject: Re: Shallow copy error in scheduler deps?
- Authentication-results: sourceware.org; auth=none
- References: <CADn89gRD47V-4n3Mr=c5vjSiOhLLmV5LSASDQ7HgWvB3ZOaf0g at mail dot gmail dot com>
On 10/20/2015 03:43 AM, Konstantin Vladimirov wrote:
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.
--- sched-int.h ---
/* Information about the dependency. */
struct dep_replacement *replace;
typedef dep_def *dep_t;
--- sched-deps.c ---
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
Conceptually I agree with you, but I'd have to sit down with a debugger
to really be sure.