Re: Tracking down bugs uncovered by enabling ``Pointer Protection''

2007-05-02 Thread Chris Kuethe

On 5/2/07, Matthew R. Dempsky <[EMAIL PROTECTED]> wrote:

I've found a lot of documents cause xpdf to crash when using
MALLOC_OPTIONS=P, and now I've found a way to crash firefox as well.
Does anyone have advice on tracking down and fixing these bugs?


* build xpdf with debug symbols
cd /usr/ports/textproc/xpdf
make DEBUG=-g

* run it
cd ./w-xpdf-3.02/xpdf-3.02/xpdf/
./xpdf ~/crashme.pdf

* see where it crashed
gdb -c xpdf.core xpdf

or just run your debug-able binary from within gdb so you can see what
was going on at the time of the crash. either way, you have debug
symbols and source, so you can follow the white rabbit, err, the data
around until you find where the crash comes from.

as for mozilla-derived browsers crashing, that comes as no great surprise.
http://www.openbsd.org/papers/pacsec03/e/mgp00016.html

Once you've fixed a bug like this, you can send a patch to ports@ as
well as upstream for inclusion in the next version of whatever package
you're looking at. Some projects/developers really appreciate bug
reports and fixes  others don't.

CK

--
GDB has a 'break' feature; why doesn't it have 'fix' too?



Tracking down bugs uncovered by enabling ``Pointer Protection''

2007-05-02 Thread Matthew R. Dempsky
I've found a lot of documents cause xpdf to crash when using
MALLOC_OPTIONS=P, and now I've found a way to crash firefox as well.
Does anyone have advice on tracking down and fixing these bugs?