Boost logo

Geometry :

Subject: Re: [geometry] Interesting errors
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-06-22 16:40:46


Hi Adam,

Sorry for the late reply.

Adam Wulkiewicz wrote On 14-6-2014 16:57:
> 2014-06-14 15:50 GMT+02:00 Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]
> <mailto:adam.wulkiewicz_at_[hidden]>>:
>
> Hi,
>
> I've noticed some interesting errors on some platforms. It would
> be interesting to try to know what's the cause and fix or prepare
> workaround if possible.
>
> -----------------------------------------------------------------------------------------------------------
>
> 1. Most of the tests of Sandia-intel-11.1 runner. Surprisingly,
> not all. E.g.:
>
> http://www.boost.org/development/tests/develop/developer/output/Sandia-intel-11-1-boost-bin-v2-libs-geometry-test-geometries-box-test-intel-darwin-debug.html
>
> Run fail: signal: SIGSEGV, si_code: 0 (memory access violation at
> address: 0x00000000)
>
>
> May this be caused by passing dummy pointer set to 0 to the
> ignore_unused_variable_warning() function in core/access.hpp?

This would unexpected. So the ignore_unused_variable_warning really uses
the contents of the dummy pointer?

>
> If you agree I'd like to get rid of the pointers and instead use:
>
> detail::signature_getset_dimension const& dummy =
> detail::signature_getset_dimension()

This creates an (empty) object every time, and access is called many
times in all our functions.
We should fix this by just removing the dummy variable name AND the
boost::ignore... statement.

>
> of course if this is still needed. Otherwise we could think about
> removing them.
>
> I may be mistaken but AFAIR I implemented a few overloads of some
> function with different number of template parameters somewhere and
> everything works (tests pass on all tested platforms).
> Is it possible that this was a problem for some old versions of GCC
> for which the support was dropped?

Indeed it seems to work well without now (tried clang 3.0, gcc 4.6.3 and
MSVC 2005). But I don't have all compilers we support. This code dates
from 2008, and I remember it was necessary at that time (might be gcc
indeed). We might try to drop it and look at the regression matrix.

Regards, Barend



Geometry list run by mateusz at loskot.net