[Mesa-dev] [PATCH 5/6] egl/x11: trust our loader over the xserver for the drivername

Boyan Ding boyan.j.ding at gmail.com
Sat Aug 8 01:29:57 PDT 2015


2015-08-08 16:05 GMT+08:00 Timothy Arceri <t_arceri at yahoo.com.au>:
> This change is causing a bunch of issues during a piglit run on my system. I'm
> getting error messages like this:
>
> *** Error in `/home/timothy/data/piglit/bin/glslparsertest_gles2': free():
> invalid pointer: 0x00000000022d4be0 ***
>
> Any ideas what might be wrong?

The problem is probably here:
> +   if (loader_driver_name) {
> +      free(driver_name);
> +      driver_name = loader_driver_name;
> +   }
> +

I think the 'free' here might be wrong. The glx code frees driverName because
the helper function DRI2Connect there malloc'ed a buffer to hold driver name
but the driver_name here is directly got from xcb reply. As you can see in the
following code, it should be dup'ed to use.

Regards,
Boyan Ding

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list