Skip to content

Valgrind reports "Conditional jump or move depends on uninitialised value" #6267

@wtdcode

Description

@wtdcode

ImageMagick version

a8f6186

Operating system

Linux

Operating system, version and so on

Ubuntu 22.04.2 LTS \n \l

Description

Valgrind reports:

==126583== Memcheck, a memory error detector
==126583== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==126583== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==126583== Command: /ImageMagick/local/bin/magick -limit thread 1 /tmp/1.bmp /dev/null
==126583==
==126583== Conditional jump or move depends on uninitialised value(s)
==126583==    at 0x149AD9: ClampToQuantum (quantum.h:91)
==126583==    by 0x149AD9: SetPixelViaPixelInfo (pixel-accessor.h:861)
==126583==    by 0x149AD9: SyncImage (image.c:3949)
==126583==    by 0x2617CB: ReadVIFFImage (viff.c:752)
==126583==    by 0x2B32E5: ReadImage (constitute.c:736)
==126583==    by 0x2B472A: ReadImages (constitute.c:1086)
==126583==    by 0x41D866: CLINoImageOperator (operation.c:4941)
==126583==    by 0x42C9B8: CLIOption (operation.c:5453)
==126583==    by 0x3DAFD4: ProcessCommandOptions (magick-cli.c:653)
==126583==    by 0x3DB4CC: MagickImageCommand (magick-cli.c:1025)
==126583==    by 0x3DA590: MagickCommandGenesis (magick-cli.c:177)
==126583==    by 0x142E8A: MagickMain (magick.c:151)
==126583==    by 0x4971D8F: (below main) (libc_start_call_main.h:58)
==126583==
==126583== Conditional jump or move depends on uninitialised value(s)
==126583==    at 0x14999F: ClampToQuantum (quantum.h:91)
==126583==    by 0x14999F: SetPixelViaPixelInfo (pixel-accessor.h:861)
==126583==    by 0x14999F: SyncImage (image.c:3949)
==126583==    by 0x2617CB: ReadVIFFImage (viff.c:752)
==126583==    by 0x2B32E5: ReadImage (constitute.c:736)
==126583==    by 0x2B472A: ReadImages (constitute.c:1086)
==126583==    by 0x41D866: CLINoImageOperator (operation.c:4941)
==126583==    by 0x42C9B8: CLIOption (operation.c:5453)
==126583==    by 0x3DAFD4: ProcessCommandOptions (magick-cli.c:653)
==126583==    by 0x3DB4CC: MagickImageCommand (magick-cli.c:1025)
==126583==    by 0x3DA590: MagickCommandGenesis (magick-cli.c:177)
==126583==    by 0x142E8A: MagickMain (magick.c:151)
==126583==    by 0x4971D8F: (below main) (libc_start_call_main.h:58)
==126583==
==126583== Conditional jump or move depends on uninitialised value(s)
==126583==    at 0x149AF1: ClampToQuantum (quantum.h:91)
==126583==    by 0x149AF1: SetPixelViaPixelInfo (pixel-accessor.h:863)
==126583==    by 0x149AF1: SyncImage (image.c:3949)
==126583==    by 0x2617CB: ReadVIFFImage (viff.c:752)
==126583==    by 0x2B32E5: ReadImage (constitute.c:736)
==126583==    by 0x2B472A: ReadImages (constitute.c:1086)
==126583==    by 0x41D866: CLINoImageOperator (operation.c:4941)
==126583==    by 0x42C9B8: CLIOption (operation.c:5453)
==126583==    by 0x3DAFD4: ProcessCommandOptions (magick-cli.c:653)
==126583==    by 0x3DB4CC: MagickImageCommand (magick-cli.c:1025)
==126583==    by 0x3DA590: MagickCommandGenesis (magick-cli.c:177)
==126583==    by 0x142E8A: MagickMain (magick.c:151)
==126583==    by 0x4971D8F: (below main) (libc_start_call_main.h:58)
==126583==
==126583== Conditional jump or move depends on uninitialised value(s)
==126583==    at 0x1499D0: ClampToQuantum (quantum.h:91)
==126583==    by 0x1499D0: SetPixelViaPixelInfo (pixel-accessor.h:863)
==126583==    by 0x1499D0: SyncImage (image.c:3949)
==126583==    by 0x2617CB: ReadVIFFImage (viff.c:752)
==126583==    by 0x2B32E5: ReadImage (constitute.c:736)
==126583==    by 0x2B472A: ReadImages (constitute.c:1086)
==126583==    by 0x41D866: CLINoImageOperator (operation.c:4941)
==126583==    by 0x42C9B8: CLIOption (operation.c:5453)
==126583==    by 0x3DAFD4: ProcessCommandOptions (magick-cli.c:653)
==126583==    by 0x3DB4CC: MagickImageCommand (magick-cli.c:1025)
==126583==    by 0x3DA590: MagickCommandGenesis (magick-cli.c:177)
==126583==    by 0x142E8A: MagickMain (magick.c:151)
==126583==    by 0x4971D8F: (below main) (libc_start_call_main.h:58)
==126583==
<... something else...>

Steps to Reproduce

export MAGIC_CONF_FLAGS=--disable-openmp --with-bzlib=no --with-djvu=no --with-dps=no --with-fftw=no --with-fpx=no --with-fontconfig=no --with-freetype=no --with-gvc=no --with-jbig=no --with-jpeg=no --with-lcms=no --with-lqr=no --with-lzma=no --with-openexr=no --with-openjp2=no --with-pango=no --with-png=no --with-tiff=no --with-raqm=no --with-webp=no --with-wmf=no --with-x=no --with-xml=no --with-zlib=no --enable-hdri=no --enable-shared=no --enable-static=yes

./configure $MAGIC_CONF_FLAGS --prefix=/path/to/install
make -j && make install
valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all /path/to/install/bin/magick -limit thread 1 /tmp/1.bmp /dev/null

Images

img.tar.gz

See attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions