[Beignet] [PATCH] Increase size for compile log output
Giuseppe Bilotta
giuseppe.bilotta at gmail.com
Fri Mar 25 11:14:39 UTC 2016
The space to hold the output log from the compiler is currently
preallocated. The previous size (1000 chars) is too small when many
warnings and/or errors are present.
Enlarge the buffer to 1024*1024 chars, in order to allow up to 1024
errors, each taking 1024 bytes to report. This is still a rather
arbitrary choice, but should hopefully fit a wider range of cases.
(This fixes an issue reported on #opencl)
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
---
src/cl_program.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/cl_program.c b/src/cl_program.c
index fb8eea5..b4656ce 100644
--- a/src/cl_program.c
+++ b/src/cl_program.c
@@ -120,6 +120,7 @@ cl_program_delete(cl_program p)
cl_free(p);
}
+#define BUILD_LOG_MAX_SIZE (1024*1024U)
LOCAL cl_program
cl_program_new(cl_context ctx)
{
@@ -133,9 +134,9 @@ cl_program_new(cl_context ctx)
p->magic = CL_MAGIC_PROGRAM_HEADER;
p->ctx = ctx;
p->cmrt_program = NULL;
- p->build_log = calloc(1000, sizeof(char));
+ p->build_log = calloc(BUILD_LOG_MAX_SIZE, sizeof(char));
if (p->build_log)
- p->build_log_max_sz = 1000;
+ p->build_log_max_sz = BUILD_LOG_MAX_SIZE;
/* The queue also belongs to its context */
cl_context_add_ref(ctx);
--
2.6.3.659.gfdd8f28
More information about the Beignet
mailing list