On Tue, Jun 30, 2015 at 5:12 AM, Chris Siebenmann <c...@cs.toronto.edu>
wrote:
> > > /data/code/git/darktable/src/common/interpolation.c: In function
> > > ‘dt_interpolation_compute_sample’:
> > > /data/code/git/darktable/src/common/interpolation.c:789:21: error:
> array
> > > subscript is above array bounds [-Werror=array-bounds]
> > > h += kernelh[j] * ipixel[0];
> > > ^
> > > cc1: all warnings being treated as errors
> > >
> > > Fedora 22 is using gcc 5.1.1, according to 'gcc --version'.
> >
> > So far, we consider this to be a gcc bug.
> > Feel free to report it to report it to fedora/$(DISTRO_NAME)/gcc
> bugzilla.
>
> I've now reported this to the Fedora 22 people as:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1236784
>
> Hopefully they will agree that this is a gcc bug and do something
> about it.
>
> In terms of bounds analysis here, in case I have to discuss this with
> the Fedora people: since bordermode is forced to not be BORDER_CLAMP
> in this branch, prepare_tap_boundaries() will set xtap_first to 0 and
> xtap_last to 2 * itor->width, and itor->width is asserted as less than
> 4 at the start of the function. Thus we can't go outside the 0..7 range
> of the kernelh[8] array. Is that a correct analysis or am I missing
> something subtle?
>
That is my understanding, yes.
One thing: asserts are enabled only in Debug build mode, so i'm not sure if
that assert is not being ignored at all...
Alternatively, if the warning is correct, i think it should be also
outputted
in the next function, on the following line:
https://github.com/darktable-org/darktable/blob/b2219b57bd2bbb56c28db390f3eec9eb2b4dad1e/src/common/interpolation.c#L831
I checked and the official Fedora 1.6.7 darktable package builds
> fine with their version of gcc. This is kind of odd, because the relevant
> code seems to be exactly the same. The build environment may be different
> in a RPM build versus being done through build.sh, or maybe something
> else changed.
>
If it is being built with gcc-5 too, i would guess that they either do not
enable
some optimisations (see my note about successful build with RelWithDebInfo),
or SOURCE_PACKAGE is set, thus, disabling fatality of the warnings:
https://github.com/darktable-org/darktable/blob/b2219b57bd2bbb56c28db390f3eec9eb2b4dad1e/src/CMakeLists.txt#L630
(I checked because I figured it might be easier to report a 'failed to
> build from source due to gcc problem' error on an existing Fedora package
> than 'here's a gcc problem exposed by a not-currently-packaged thing'.)
>
> - cks
>
Roman.
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel