[poppler] Bogus memory allocation size

Reece Dunn msclrhd at googlemail.com
Sat May 5 00:39:47 PDT 2012


On 5 May 2012 08:13, suzuki toshiya <mpsuzuki at hiroshima-u.ac.jp> wrote:
> I'm quite sorry! My posts assuming the error is 64-bit CPU specific
> were wrong. I could reproduce the error on Linux i386 (I was testing
> wrong revisions). I found 0.19.4 - 0.19.0 have this issue, but 0.18.4
> does not have. Now I'm trying to find when this issue began.

On one of the linux boxes, you can do a git bisect to locate the issue quicker:

1. Initial setup:

# Clone the git repository:
git clone git://git.freedesktop.org/git/poppler/poppler

# Get the 0.19.0 release (first known revision containing the issue):
git checkout poppler-0.19.0

# Start the bisect
git bisect start

# Inform git that poppler-0.19.0 has the issue
git bisect bad

# Get the 0.18.4 release (first known revision not containing the issue):
git checkout poppler-0.18.4

# Inform git that poppler-0.18.4 does not have the issue
git bisect good

2. Build the current revision:

# Clean the poppler directory of build files
git clean -fxd

# Build poppler
./autogen
./configure
make

# Run your test using the built poppler
...

# If the revision contains the bug, run:
git bisect bad
# ... and go back to step 2

# If the revision does not contain the bug, run:
git bisect good
# ... and go back to step 2

# If the bisect has finished, that commit is the problem commit
# Note the sha1 of the commit and go to step 3
export BAD_COMMIT=<sha1 of commit bisect reports>

3. Verify that reverting the commit fixes the issue

# Stop the bisect operation
git bisect reset

# Go to the master (main) branch
git checkout master

# Clean the poppler directory of build files
git clean -fxd

# Build poppler
./autogen
./configure
make

# Run your test using the built poppler (should fail)
...

# Revert the bad commit
git revert ${BAD_COMMIT}

# Clean the poppler directory of build files
git clean -fxd

# Build poppler
./autogen
./configure
make

# Run your test using the built poppler (should pass)
...

4. Report the bad commit

# Get the bad commit
git show ${BAD_COMMIT} > bad-commit.diff

# View the bad commit
cat bad-commit.diff

Thanks,
 - Reece


More information about the poppler mailing list