Bug 100487 - st_cb_eglimage.c:64:7: error: format not a string literal and no format arguments
Summary: st_cb_eglimage.c:64:7: error: format not a string literal and no format argum...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-30 14:19 UTC by Fabio Pedretti
Modified: 2017-03-30 15:00 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Fabio Pedretti 2017-03-30 14:19:00 UTC
I get this compile error since yesterday:
../../../../src/mesa/state_tracker/st_cb_eglimage.c: In function ‘st_egl_image_get_surface’:
../../../../src/mesa/state_tracker/st_cb_eglimage.c:64:7: error: format not a string literal and no format arguments [-Werror=format-security]
       _mesa_error(ctx, GL_INVALID_VALUE, error);
       ^~~~~~~~~~~
../../../../src/mesa/state_tracker/st_cb_eglimage.c:71:7: error: format not a string literal and no format arguments [-Werror=format-security]
       _mesa_error(ctx, GL_INVALID_OPERATION, error);
       ^~~~~~~~~~~

Likely (but I didn't bisect) commits to blame are:

..

commit	d10172d52791b1fc0b791dd10c823668ecb7a4f8 (patch)

st/mesa: move st_manager_get_egl_image_surface into st_cb_eglimage.c
The only callers are here, and we will add generation of GL errors in
the following patch.  Rename the function to st_egl_image_get_surface,
pass the gl_context instead of st_context, and move the cast from
GLeglImageOES to void* into st_egl_image_get_surface.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

..

commit	83e9de25f325f3fce78be864a9dd80e6274b8ca8 (patch)

st/mesa: EGLImageTarget* error handling
Stop trying to specify texture or renderbuffer objects for unsupported
EGL images. Generate the error codes specified in the OES_EGL_image
extension.

EGLImageTargetTexture2D and EGLImageTargetRenderbuffer would call
the pipe driver's create_surface callback without ever checking that
the given EGL image is actually compatible with the chosen target
texture or renderbuffer. This patch adds a call to the pipe driver's
is_format_supported callback and generates an INVALID_OPERATION error
for unsupported EGL images. If the EGL image handle does not describe
a valid EGL image, an INVALID_VALUE error is generated.

v2: fixed get_surface to actually use the usage and error parameters

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

..

Full build log and configure options here:
https://launchpadlibrarian.net/313531594/buildlog_ubuntu-zesty-amd64.mesa_17.1~git1703300730.36cb20~gd~z_BUILDING.txt.gz
Comment 1 Nicolai Hähnle 2017-03-30 15:00:33 UTC
Thanks for the report. This should already be fixed in master, commit 257ee3f7ef21dfbd65a3dac423a986b926ca0d18.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.