Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] access violation in Handle.h (cgal 4.9, apple clang 7.3, C++14)
Chronological Thread
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] access violation in Handle.h (cgal 4.9, apple clang 7.3, C++14)
- Date: Thu, 02 Feb 2017 18:15:34 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:R36BmBeJHbYYmWUAcSJiJei6lGMj4u6mDksu8pMizoh2WeGdxc66YR7h7PlgxGXEQZ/co6odzbGH7+a+CCdRsd7B6ClEK8McEUddyI0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx5f/6+fn8JLaZ0BEhSG2fKhpBBSwtwTY8McM0qV4LaNkgD/Av2FFffge/2JuKFuO11bXye6Uu7Fu9CFdp+gw2cdLTaLgbuVyBehcBSk8PmYpotfqsxTKUCOE6XIYFGIMnUwbUED+8BjmU8Kp4WPBve1n1XzCMA==
- Organization: GeometryFactory
Le Monday, January 23, 2017 6:34:02 AM CET mistafunk a ?crit :
> hi
>
> i am seeing an access violation in Handle.h:56. for some reason, the
> returned reference by Lazy::zero() does not seem to be valid. the problem
> is reproducible with cgal 4.9 and apple clang 7.3 (-std=c++14). the
> stacktrace
> <http://cgal-discuss.949826.n4.nabble.com/file/n4662484/stacktrace.txt>
> is attached.
>
> in Lazy::zero(), the macro CGAL_STATIC_THREAD_LOCAL_VARIABLE is used and
> its definition looks like this (tss.h:34, note that apple clang 7.3 does
> not yet support thread_local):
>
> # define CGAL_STATIC_THREAD_LOCAL_VARIABLE(TYPE, VAR, ARG1) \
> static boost::thread_specific_ptr<TYPE> VAR##_ptr; \
> if(VAR##_ptr.get() == NULL) {VAR##_ptr.reset(new TYPE(ARG1));} \
> TYPE& VAR = * VAR##_ptr.get()
>
> so i am basically trying to understand how Lazy::zero() can return an
> invalid reference.
>
> thanks & best,
> simon
How can you tell that it is `Lazy::zero()` that triggers the error? I do not
see that from the backtrace.
Do you have multiple threads?
It could be that a bad JNI call, or a double-free, or a use-after-free, has
corrupted the heap or stack. You should try to reproduce the same issue in a
standalone C++ file, without Java. Doing that, you will probably find out the
issue by yourself. Otherwise, post your code to an online web service, like
gist.github.com and show us the code.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- Re: [cgal-discuss] access violation in Handle.h (cgal 4.9, apple clang 7.3, C++14), Laurent Rineau (CGAL/GeometryFactory), 02/02/2017
Archive powered by MHonArc 2.6.18.