pdf-devel
[Top][All Lists]
Advanced

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

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


From: Juan Pedro Bolivar Puente
Subject: Re: [pdf-devel] pdf-stm-f-lzw.c
Date: Fri, 04 Sep 2009 18:30:41 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steven Vancoillie wrote:
> 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
> 

I will take a look at it. I have not run throught that problem so it
seems to be a subtle error. Can you tell me in which test case did the
problem arise? And could you give me some details about wordsize and
endianess of your machine?

Thanks for your feedback,
JP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqhQLEACgkQchi8veCammerGwCfZTKyY2Z8aCclGQrrvg0LcskQ
/fEAn1Swygq9DYxWW3eK9gtgOeC8sGYm
=Qi8s
-----END PGP SIGNATURE-----




reply via email to

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