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
It seems a set of polygons which ends in an empty polygon triggers a segmentation violation. Please see attached program and output from Valgrind below.
This was tested with Clipper 2 v1.2.0 on Debian Linux.
make -w -k -j8 make: Entering directory '/home/mhayden/plotter/plotter/clipper' g++ -g -O2 -std=c++17 -I/home/mhayden/plotter/toolchain/clipper2/release/linux/Clipper2/include clipper_test.cpp /home/mhayden/plotter/toolchain/clipper2/release/linux/Clipper2/lib/libclipper2.a -o test valgrind ./test ==44300== Memcheck, a memory error detector ==44300== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==44300== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==44300== Command: ./test ==44300== len=55 len=48 len=14 len=58 polygons=1 len=25 ==44300== Invalid write of size 8 ==44300== at 0x1102BC: Clipper2Lib::ClipperBase::AddPaths(std::vector<std::vector<Clipper2Lib::Point<long>, std::allocator<Clipper2Lib::Point<long> > >, std::allocator<std::vector<Clipper2Lib::Point<long>, std::allocator<Clipper2Lib::Point<long> > > > > const&, Clipper2Lib::PathType, bool) (clipper.engine.cpp:597) ==44300== by 0x1096FF: AddSubject (clipper.engine.h:446) ==44300== by 0x1096FF: main (clipper_test.cpp:216) ==44300== Address 0x4cb3b70 is 16 bytes after a block of size 7,008 in arena "client" ==44300== clipper_test.zip
The text was updated successfully, but these errors were encountered:
It seems a set of polygons which ends in an empty polygon triggers a segmentation violation. Please see attached program and output from Valgrind below.
This was tested with Clipper 2 v1.2.0 on Debian Linux.
make -w -k -j8 make: Entering directory '/home/mhayden/plotter/plotter/clipper' g++ -g -O2 -std=c++17 -I/home/mhayden/plotter/toolchain/clipper2/release/linux/Clipper2/include clipper_test.cpp /home/mhayden/plotter/toolchain/clipper2/release/linux/Clipper2/lib/libclipper2.a -o test valgrind ./test ==44300== Memcheck, a memory error detector ==44300== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==44300== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==44300== Command: ./test ==44300== len=55 len=48 len=14 len=58 polygons=1 len=25 ==44300== Invalid write of size 8 ==44300== at 0x1102BC: Clipper2Lib::ClipperBase::AddPaths(std::vector<std::vector<Clipper2Lib::Point<long>, std::allocator<Clipper2Lib::Point<long> > >, std::allocator<std::vector<Clipper2Lib::Point<long>, std::allocator<Clipper2Lib::Point<long> > > > > const&, Clipper2Lib::PathType, bool) (clipper.engine.cpp:597) ==44300== by 0x1096FF: AddSubject (clipper.engine.h:446) ==44300== by 0x1096FF: main (clipper_test.cpp:216) ==44300== Address 0x4cb3b70 is 16 bytes after a block of size 7,008 in arena "client" ==44300==
clipper_test.zip
The text was updated successfully, but these errors were encountered: