CGAL führt dazu, dass UB Sanitizer Fehler meldetC++

Programme in C++. Entwicklerforum
Anonymous
 CGAL führt dazu, dass UB Sanitizer Fehler meldet

Post by Anonymous »

Code: Select all

#include 
#include 
#include 
using K = CGAL::Epeck;

int main() {

CGAL::Point_2 pA[] = { { 20, 10 }, { 20, 20 }, { 10, 10 } };
CGAL::Point_2 pB[] = { { 5, 5 }, { -5, 5 }, { -5, -5 } };
CGAL::Polygon_2 polyA{ pA, pA + 3 };
CGAL::Polygon_2 polyB{ pB, pB + 3 };
CGAL::do_intersect(polyA, polyB);

return 0;
}
Das Ändern des Kernels auf Epick hat nichts gebracht
ASan erstellt ein Protokoll mit 5000 Dateien, wenn ich das obige Programm ausführe. So sehen die ersten 370 Zeilen aus, die vor dem Beenden des Programms erscheinen (der Rest ist eine Zusammenfassung über Lecks mit extrem langen Funktionsnamen):
Beim Kompilieren mit -fsanitize=undefiniert erhalte ich viele Fehler, die so aussehen:

Code: Select all

/usr/include/CGAL/Arrangement_2/Arrangement_2_iterators.h:458:9: runtime error: downcast of address 0x7c3da91e0280 which does not point to an object of type 'Face'
0x7c3da91e0280: note: object is of type 'CGAL::Arr_face'
00 00 00 00  08 92 36 95 39 56 00 00  01 00 00 00 be be be be  90 02 1e a9 3d 7c 00 00  90 02 1e a9
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'CGAL::Arr_face'
/usr/include/CGAL/Arrangement_2/Arrangement_2_iterators.h:514:12: runtime error: downcast of address 0x7c3da91e0280 which does not point to an object of type 'Face'
0x7c3da91e0280: note: object is of type 'CGAL::Arr_face'
00 00 00 00  08 92 36 95 39 56 00 00  01 00 00 00 be be be be  90 02 1e a9 3d 7c 00 00  90 02 1e a9
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'CGAL::Arr_face'
/usr/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h:51:40: runtime error: member call on address 0x7c3da91e0280 which does not point to an object of type 'Face'
0x7c3da91e0280: note: object is of type 'CGAL::Arr_face'
00 00 00 00  08 92 36 95 39 56 00 00  01 00 00 00 be be be be  90 02 1e a9 3d 7c 00 00  90 02 1e a9
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'CGAL::Arr_face'
/usr/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h:52:65: runtime error: member call on address 0x7c3da91e0280 which does not point to an object of type 'Face'
0x7c3da91e0280: note: object is of type 'CGAL::Arr_face'
00 00 00 00  08 92 36 95 39 56 00 00  01 00 00 00 be be be be  90 02 1e a9 3d 7c 00 00  90 02 1e a9
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'CGAL::Arr_face'
/usr/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h:183:52: runtime error: member call on address 0x7c3da91e0280 which does not point to an object of type 'Face'
0x7c3da91e0280: note: object is of type 'CGAL::Arr_face'
00 00 00 00  08 92 36 95 39 56 00 00  01 00 00 00 be be be be  90 02 1e a9 3d 7c 00 00  90 02 1e a9
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'CGAL::Arr_face'
CGAL-Version: 6.1
Betriebssystem: Linux
Compiler: GCC 15.2.1

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post