Mesa (master): aco: Fix format string used when raising validation errors
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 5 18:05:21 UTC 2020
Module: Mesa
Branch: master
Commit: 1a1099c54f1c09674a27e8a1ce196a05ee2fb467
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a1099c54f1c09674a27e8a1ce196a05ee2fb467
Author: Tony Wasserka <tony.wasserka at gmx.de>
Date: Wed Nov 4 12:44:10 2020 +0100
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: c2b1978aa47c ("aco: rework the way various compilation/validation errors are reported")
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7442>
---
src/amd/compiler/aco_validate.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp
index b1c46143b4d..897e76a6d1f 100644
--- a/src/amd/compiler/aco_validate.cpp
+++ b/src/amd/compiler/aco_validate.cpp
@@ -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;
More information about the mesa-commit
mailing list