CGAL assertion when run using valgrind

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CGAL assertion when run using valgrind

Thomas Zangl - Home
Hi!

If I run a certain application which uses CGAL I get an assertion if its
profiled using callgrind:

valgrind --tool=callgrind ./myapp

If I run the same application w/o valgrind/callgrind it works.

The message is:

tzi@helio:~$ valgrind --tool=callgrind ./myapp
==30295== Callgrind, a call-graph generating cache profiler.
==30295== Copyright (C) 2002-2007, and GNU GPL'd, by Josef Weidendorfer
et al.
==30295== Using LibVEX rev 1804, a library for dynamic binary translation.
==30295== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30295== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation
framework.
==30295== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==30295== For more details, rerun with: -v
==30295==
==30295== For interactive control, run 'callgrind_control -h'.
Starting ALL...

Writing debug.list
Starting regularTriangulation...
Time for regularTriangulation: [525.09 s]

Starting writeSingularSegments...
CGAL error: postcondition violation!
Expr: is_ccw_strongly_convex_2( res.output_so_far_begin(),
res.output_so_far_end(), ch_traits)
File:
/home/tzi/CGAL-3.3.1/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h
Line: 232
terminate called after throwing an instance of 'std::logic_error'
   what():  basic_string::_S_construct NULL not valid
==30295==
==30295== Events    : Ir
==30295== Collected : 12454834378
==30295==
==30295== I   refs:      12,454,834,378
Aborted


Any idea whats wrong?

TIA! Thomas
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: CGAL assertion when run using valgrind

Laurent Rineau-3
On Monday 26 May 2008 10:46:35 Thomas Zangl wrote:
> Hi!
>
> If I run a certain application which uses CGAL I get an assertion if its
> profiled using callgrind:
>
> valgrind --tool=callgrind ./myapp
>
> If I run the same application w/o valgrind/callgrind it works.

I have tried to run several CGAL applications under valgrind, and they
mysteriously failed.

Running some internal tests, I have discovered that the FPU rounding mode is
not correctly handled by valgrind. Actually, that is even a documented
limitation :
  http://valgrind.org/docs/manual/manual-core.html
"2.11. Limitations

Rounding: Valgrind does observe the 4 IEEE-mandated rounding modes (to
nearest, to +infinity, to -infinity, to zero) for the following conversions:
float to integer, integer to float where there is a possibility of loss of
precision, and float-to-float rounding. For all other FP operations, only the
IEEE default mode (round to nearest) is supported."

It means that only the FE_TONEAREST rounding mode is implemented in arithmetic
operations. CGAL interval arithmetic actually needs FE_UPWARD too.

Most probably your application uses the interval arithmetic (all filtered
kernel — "exact predicates inexact constructions" — do). I do not see any
acceptable solution for you, because kernels without interval filtering are
slower that filtered ones.

--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss