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 <[email protected]> --- 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 _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet
