pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pdf-devel] pdf-stm-f-lzw.c


From: Steven Vancoillie
Subject: [pdf-devel] pdf-stm-f-lzw.c
Date: Fri, 04 Sep 2009 17:28:14 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

Hi,

I encountered the following problem when running "make check":

base/stm/pdf-stm-write.c:998:E:pdf_stm_write:pdf_stm_write_016:0: (after
this point) Received signal 11 (Segmentation fault)

With gdb, I could trace the problem to the following line
(base/pdf-stm-f-lzw.c:321)

*(*decode)-- = d->table[code].suffix;

The value of the variable "code" (unsigned) at this point is 131117,
while the maximum allowed value is 4096 to stay within the bounds of the
table array (size defined by LZW_MAX_DICTSIZE).

Two questions:

1) When I ran gdb, the value of the variable "code" was indicated as
code=<value optimized out>.  Is there a way to obtain the value from gdb
by changing e.g. some compiler flags?  Otherwise one has to add print
statements to the source code.

2) Is it possible to track the value of "code" throughout the program,
e.g. asking gdb to stop when the value goes above 4096?

Thanks for your help,
Steven

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]