[Piglit] [PATCH 1/5] cl/program-tester: Make sure that platform_ids is initialized
Jan Vesely
jan.vesely at rutgers.edu
Fri Dec 23 15:00:37 UTC 2016
On Thu, 2016-12-22 at 22:10 -0600, Aaron Watry wrote:
> Otherwise, if you have ICDs installed and none successfully dlopen, you
> end up freeing uninitialized/invalid memory.
>
> Signed-off-by: Aaron Watry <awatry at gmail.com>
LGTM.
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
Jan
>
> Discovered after an upgrade where I forgot to build mesa into clover, and
> the nvidia icd was left around with no library to back it.
> ---
> tests/util/piglit-framework-cl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/util/piglit-framework-cl.c b/tests/util/piglit-framework-cl.c
> index 9dc73c7..235f160 100644
> --- a/tests/util/piglit-framework-cl.c
> +++ b/tests/util/piglit-framework-cl.c
> @@ -194,7 +194,7 @@ int piglit_cl_framework_run(int argc, char** argv)
>
> bool platform_defined;
> unsigned int num_platforms;
> - cl_platform_id* platform_ids;
> + cl_platform_id* platform_ids = NULL;
>
> /* Create regexes */
> if( config->platform_regex != NULL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20161223/ff6e2b99/attachment.sig>
More information about the Piglit
mailing list