summaryrefslogtreecommitdiff
path: root/tools/intel_error_decode.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-11 15:18:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-11 15:18:57 +0100
commitc88c91fa8e5ae41a0201053ac4a46a722344b758 (patch)
tree6d70ce8532a1e55dd3d4ffcfc30480d68ea1fdea /tools/intel_error_decode.c
parenta355b2d6eb428f8c64ff7251a32e40d81ea4bbec (diff)
intel_error_decode: Tell zlib the correct amount of memory we allocated
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/intel_error_decode.c')
-rw-r--r--tools/intel_error_decode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
index 6d07ce88..2cbdd887 100644
--- a/tools/intel_error_decode.c
+++ b/tools/intel_error_decode.c
@@ -482,7 +482,7 @@ static int zlib_inflate(uint32_t **ptr, int len)
out = malloc(128*4096); /* approximate obj size */
zstream.next_out = out;
- zstream.avail_out = 40*len;
+ zstream.avail_out = 128*4096;
do {
switch (inflate(&zstream, Z_SYNC_FLUSH)) {
@@ -576,10 +576,9 @@ read_data_file(FILE *file)
if (line[0] == ':' || line[0] == '~') {
count = ascii85_decode(line+1, &data, line[0] == ':');
- if (count == 0) {
- fprintf(stderr, "ASCII85 decode failed.\n");
- exit(1);
- }
+ if (count == 0)
+ fprintf(stderr, "ASCII85 decode failed (%s - %s).\n",
+ ring_name, buffer_name);
decode(decode_ctx,
buffer_name, ring_name,
gtt_offset, head_offset,