Код: Выделить всё
#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;
}
ASan создает журнал из 5000 файлов, когда я запускаю приведенную выше программу. Вот как выглядят первые 370 строк, которые появляются перед выходом из программы (остальное — это сводка об утечках с очень длинными именами функций):
При компиляции с -fsanitize=undefined я получаю много ошибок такого вида:
Код: Выделить всё
/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'
ОС: Linux
Компилятор: GCC 15.2.1
Подробнее здесь: https://stackoverflow.com/questions/798 ... ort-errors
Мобильная версия