You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
This simple sample program causes a segfault, but commenting out the line which declares a CGAL::Nef_polyhedron_3 in foo() and it all works and outputs "block volume = 1".
My system is RHEL6 building with gcc4.4 and using SFCGAL 1.3.0 and CGAL 4.9. SFCGAL and CGAL built from source. I'm compiling with -frounding-math -g -O0 -std=c++0x
I put the Nef_polyhedron_3 into a separate function to be sure it wasn't a stack issue, but the same problem happens if the call to foo() is replaced with the body of foo(). I get an empty stack with CGAL::internal::intersection is the current stack location. Stack #1 is 0x00 (see output below).
(gdb) run
Starting program: /home/jesse.j.pepper/tmp/volume
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff751d96e in CGAL::Intersection_traits<CGAL::Simple_cartesian<CGAL::Interval_nt<false> >, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3>::result_type CGAL::internal::intersection<CGAL::Simple_cartesian<CGAL::Interval_nt<false> > >(CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3 const&, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3 const&, CGAL::Simple_cartesian<CGAL::Interval_nt<false> > const&) ()
from /home/jesse.j.pepper/git/builder-code/work/rhel6_64-gcc4_4-sfcgal-1_3_0/binaries/lib64/libSFCGAL.so.1
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 libgcc-4.4.7-17.el6.x86_64 libstdc++-4.4.7-17.el6.x86_64
(gdb) bt
#0 0x00007ffff751d96e in CGAL::Intersection_traits<CGAL::Simple_cartesian<CGAL::Interval_nt<false> >, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3>::result_type CGAL::internal::intersection<CGAL::Simple_cartesian<CGAL::Interval_nt<false> > >(CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3 const&, CGAL::Simple_cartesian<CGAL::Interval_nt<false> >::Triangle_3 const&, CGAL::Simple_cartesian<CGAL::Interval_nt<false> > const&)
() from /home/jesse.j.pepper/git/builder-code/work/rhel6_64-gcc4_4-sfcgal-1_3_0/binaries/lib64/libSFCGAL.so.1
#1 0x0000000000000000 in ?? ()
(gdb)
Interestingly, running in valgrind shows a CGAL::Assertion_exception being printed out which is not present when running on the command line or in gdb, despite the fact that I am definitely compiling with -frounding-math.
Valgrind output:
[Thu May 25, 17:48:18 ~/tmp jesse.j.pepper@peps (0)]
$ valgrind ./volume
==29016== Memcheck, a memory error detector
==29016== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==29016== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==29016== Command: ./volume
==29016==
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
File: /home/jesse.j.pepper/git/mas/builder/3rd/cgal/include/CGAL/Interval_nt.h
Line: 209
Explanation: Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?
==29016==
==29016== HEAP SUMMARY:
==29016== in use at exit: 21,095 bytes in 91 blocks
==29016== total heap usage: 110 allocs, 19 frees, 22,865 bytes allocated
==29016==
==29016== LEAK SUMMARY:
==29016== definitely lost: 0 bytes in 0 blocks
==29016== indirectly lost: 0 bytes in 0 blocks
==29016== possibly lost: 1,023 bytes in 7 blocks
==29016== still reachable: 20,072 bytes in 84 blocks
==29016== suppressed: 0 bytes in 0 blocks
==29016== Rerun with --leak-check=full to see details of leaked memory
==29016==
==29016== For counts of detected and suppressed errors, rerun with: -v
==29016== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)
Aborted (core dumped)
=================================================================================
[Thu May 25, 17:48:21 ~/tmp jesse.j.pepper@peps (0)]
$
The text was updated successfully, but these errors were encountered:
I reproduce with gcc 5.4.0 on ubuntu 16.04 with CGAL 4.7
But I have really no clue about what happens ... :/
It might be a CGAL issue. It would be interesting to try a similar code without SFCGAL. Something like a call to CGAL::intersection with and without Nef_Polyhedron ...
This simple sample program causes a segfault, but commenting out the line which declares a CGAL::Nef_polyhedron_3 in foo() and it all works and outputs "block volume = 1".
My system is RHEL6 building with gcc4.4 and using SFCGAL 1.3.0 and CGAL 4.9. SFCGAL and CGAL built from source. I'm compiling with -frounding-math -g -O0 -std=c++0x
I put the Nef_polyhedron_3 into a separate function to be sure it wasn't a stack issue, but the same problem happens if the call to foo() is replaced with the body of foo(). I get an empty stack with CGAL::internal::intersection is the current stack location. Stack #1 is 0x00 (see output below).
gdb output:
Interestingly, running in valgrind shows a CGAL::Assertion_exception being printed out which is not present when running on the command line or in gdb, despite the fact that I am definitely compiling with -frounding-math.
Valgrind output:
The text was updated successfully, but these errors were encountered: