mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 11:50:09 +01:00
aco: Fix format string used when raising validation errors
Validation errors mention the pretty-printed instruction including
operands with the reserved % character, which caused vasprintf to
expect more format arguments than aco provided.
Fixes: c2b1978aa4 ("aco: rework the way various compilation/validation errors are reported")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7442>
This commit is contained in:
parent
61d2badbf4
commit
1a1099c54f
1 changed files with 2 additions and 2 deletions
|
|
@ -88,7 +88,7 @@ bool validate_ir(Program* program)
|
|||
aco_print_instr(instr, memf);
|
||||
u_memstream_close(&mem);
|
||||
|
||||
aco_err(program, out);
|
||||
aco_err(program, "%s", out);
|
||||
free(out);
|
||||
|
||||
is_valid = false;
|
||||
|
|
@ -555,7 +555,7 @@ bool ra_fail(Program *program, Location loc, Location loc2, const char *fmt, ...
|
|||
fprintf(memf, "\n\n");
|
||||
u_memstream_close(&mem);
|
||||
|
||||
aco_err(program, out);
|
||||
aco_err(program, "%s", out);
|
||||
free(out);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue