From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] sw_sync: Initialise struct before use
Date: Thu, 31 Jan 2019 11:10:53 +0200 [thread overview]
Message-ID: <87k1ilyyxu.fsf@intel.com> (raw)
In-Reply-To: <20190130221833.19999-1-chris@chris-wilson.co.uk>
On Wed, 30 Jan 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> sw_sync: ../lib/igt_core.c:1592: __igt_fork_helper: Assertion `!proc->running'
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108889
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So the compiler sees the variable is uninitialized, but it's being
passed to a function... jolly good, that must do the initialization. :/
I trust you checked the other call sites.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tests/sw_sync.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/sw_sync.c b/tests/sw_sync.c
> index 207908ed7..ac4caf8ba 100644
> --- a/tests/sw_sync.c
> +++ b/tests/sw_sync.c
> @@ -171,12 +171,11 @@ static void test_sync_busy(void)
>
> static void test_sync_busy_fork_unixsocket(void)
> {
> + struct igt_helper_process proc = {};
> int fence;
> int timeline;
> int skip = 0;
> int sv[2];
> - struct igt_helper_process proc;
> -
>
> timeline = sw_sync_timeline_create();
> fence = sw_sync_timeline_create_fence(timeline, 1);
> @@ -258,10 +257,10 @@ out:
>
> static void test_sync_busy_fork(void)
> {
> + struct igt_helper_process proc = {};
> int fence;
> int timeline;
> int skip = 0;
> - struct igt_helper_process proc;
>
> timeline = sw_sync_timeline_create();
> fence = sw_sync_timeline_create_fence(timeline, 1);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-01-31 9:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 22:18 [igt-dev] [PATCH i-g-t] sw_sync: Initialise struct before use Chris Wilson
2019-01-30 23:01 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-31 9:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-31 9:10 ` Jani Nikula [this message]
2019-01-31 9:16 ` [igt-dev] [PATCH i-g-t] " Chris Wilson
2019-01-31 9:18 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1ilyyxu.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox