Opened 15 years ago
Closed 15 years ago
#293 closed defect (fixed)
XMLTester crashed on MinGW debug build
Reported by: | sanak | Owned by: | strk |
---|---|---|---|
Priority: | major | Milestone: | 3.2.0 |
Component: | XML Tests | Version: | main |
Severity: | Unassigned | Keywords: | mingw |
Cc: |
Description
XMLTester crashed at heisenbug.xml and stmlf-cases-20070119.xml on MinGW debug build.
Please see the following backtraces.(Thanks strk, for your advise(#276).)
Regards,
- heisenbugs.xml
$ libtool --mode=execute gdb ./XMLTester GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-mingw32"... (gdb) run ./tests/heisenbugs.xml Starting program: e:/mingw/geos-trunk/tests/xmltester/.libs/XMLTester.exe ./tests/heisenbugs.xml Program received signal SIGSEGV, Segmentation fault. 0x705165a3 in geos::index::strtree::yComparator (a=0xabababab, b=0x6531d0) at STRtree.cpp:43 43 const void* aBounds = a->getBounds(); (gdb) backtrace #0 0x705165a3 in geos::index::strtree::yComparator (a=0xabababab, b=0x6531d0) at STRtree.cpp:43 #1 0x70619394 in std::__unguarded_partition<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, geos::index::strtree::Boundable*, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first={_M_current = 0x65631c}, __last={_M_current = 0x65631c}, __pivot=0x6531d0, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2039 #2 0x70616cb3 in std::__introsort_loop<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, int, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first= {_M_current = 0x6562a4}, __last={_M_current = 0x65631c}, __depth_limit=9, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2519 #3 0x70616cd6 in std::__introsort_loop<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, int, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first= {_M_current = 0x656258}, __last={_M_current = 0x65631c}, __depth_limit=10, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2520 #4 0x70616cd6 in std::__introsort_loop<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, int, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first= {_M_current = 0x6561e0}, __last={_M_current = 0x65631c}, __depth_limit=11, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2520 #5 0x7061fbca in std::sort<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first={_M_current = 0x6561e0}, __last= {_M_current = 0x65631c}, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2589 #6 0x70517765 in geos::index::strtree::STRtree::sortBoundables ( this=0x22ec44, input=0x653008) at STRtree.cpp:243 #7 0x70516b2b in geos::index::strtree::STRtree::createParentBoundables ( this=0x22ec44, childBoundables=0x653008, newLevel=0) at STRtree.cpp:109 #8 0x7050c18b in geos::index::strtree::AbstractSTRtree::createHigherLevels ( this=0x22ec44, boundablesOfALevel=0x653008, level=-1) at AbstractSTRtree.cpp:100 #9 0x7050bcf5 in geos::index::strtree::AbstractSTRtree::build (this=0x22ec44) at AbstractSTRtree.cpp:60 #10 0x7050c3f8 in geos::index::strtree::AbstractSTRtree::query (this=0x22ec44, searchBounds=0x6530c8, matches=@0x22ea60) at AbstractSTRtree.cpp:125 #11 0x70599c27 in geos::index::strtree::STRtree::query (this=0x22ec44, searchEnv=0x6530c8, matches=@0x22ea60) at ../../source/headers/geos/index/strtree/STRtree.h:131 #12 0x7052e9d1 in geos::noding::MCIndexNoder::intersectChains (this=0x22ec30) at MCIndexNoder.cpp:75 #13 0x7052e808 in geos::noding::MCIndexNoder::computeNodes (this=0x22ec30, inputSegStrings=0x22ed90) at MCIndexNoder.cpp:54 #14 0x7052bb34 in geos::noding::FastNodingValidator::checkInteriorIntersections (this=0x22eda8) at FastNodingValidator.cpp:41 #15 0x7059b611 in geos::noding::FastNodingValidator::execute (this=0x22eda8) at ../../source/headers/geos/noding/FastNodingValidator.h:109 #16 0x7052c035 in geos::noding::FastNodingValidator::checkValid (this=0x22eda8) at FastNodingValidator.cpp:70 #17 0x7059f560 in geos::geomgraph::EdgeNodingValidator::checkValid ( this=0x22ed90) at ../../../source/headers/geos/geomgraph/EdgeNodingValidator.h:100 #18 0x7059f4bf in geos::geomgraph::EdgeNodingValidator::checkValid ( edges=@0x22f06c) at ../../../source/headers/geos/geomgraph/EdgeNodingValidator.h:88 #19 0x7055fbee in geos::operation::overlay::OverlayOp::computeOverlay ( this=0x22efd0, opCode=opINTERSECTION) at OverlayOp.cpp:703 #20 0x7055e522 in geos::operation::overlay::OverlayOp::getResultGeometry ( this=0x22efd0, funcCode=opINTERSECTION) at OverlayOp.cpp:188 #21 0x7055d2a7 in geos::operation::overlay::OverlayOp::overlayOp ( geom0=0x3ede58, geom1=0x6421d8, opCode=opINTERSECTION) at OverlayOp.cpp:94 #22 0x00431665 in geos::operation::overlay::overlayOp::operator() ( this=0x22f21c, g0=0x3ede58, g1=0x6421d8) at ../../source/headers/geos/operation/overlay/OverlayOp.h:344 #23 0x0042ff73 in geos::geom::BinaryOp<geos::operation::overlay::overlayOp> ( g0=0x3ede58, g1=0x6421d8, _Op={opCode = opINTERSECTION}) at ../../source/headers/geos/geom/BinaryOp.h:215 #24 0x0040af9a in XMLTester::parseTest (this=0x22feb0, node=0x3e9848) at XMLTester.cpp:1213 #25 0x00404956 in XMLTester::parseCase (this=0x22feb0, node=0x3e2f28) at XMLTester.cpp:636 #26 0x00403072 in XMLTester::parseRun (this=0x22feb0, node=0x3e2c38) at XMLTester.cpp:427 #27 0x00402e73 in XMLTester::run (this=0x22feb0, source=@0x22fe90) at XMLTester.cpp:391 #28 0x0040d8a8 in main (argC=2, argV=0x3e4e30) at XMLTester.cpp:1450
- stmlf-cases-20070119.xml
$ libtool --mode=execute gdb ./XMLTester GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-mingw32"... (gdb) run ./tests/stmlf/stmlf-cases-20070119.xml Starting program: e:/mingw/geos-trunk/tests/xmltester/.libs/XMLTester.exe ./tests/stmlf/stmlf-cases-20070119.xml Program received signal SIGSEGV, Segmentation fault. 0x705165b5 in geos::index::strtree::yComparator (a=0x3ebcd8, b=0x1c07d1) at STRtree.cpp:44 44 const void* bBounds = b->getBounds(); (gdb) backtrace #0 0x705165b5 in geos::index::strtree::yComparator (a=0x3ebcd8, b=0x1c07d1) at STRtree.cpp:44 #1 0x706193cc in std::__unguarded_partition<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, geos::index::strtree::Boundable*, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first={_M_current = 0x3ec340}, __last={_M_current = 0x3ec33c}, __pivot=0x3ebcd8, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2042 #2 0x70616cb3 in std::__introsort_loop<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, int, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first= {_M_current = 0x3ec340}, __last={_M_current = 0x3ec38c}, __depth_limit=7, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2519 #3 0x7061fbca in std::sort<__gnu_cxx::__normal_iterator<geos::index::strtree::Boundable**, std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> > >, bool (*)(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)> (__first={_M_current = 0x3ec340}, __last= {_M_current = 0x3ec38c}, __comp=0x70516556 <geos::index::strtree::yComparator(geos::index::strtree::Boundable*, geos::index::strtree::Boundable*)>) at C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algo.h:2589 #4 0x70517765 in geos::index::strtree::STRtree::sortBoundables ( this=0x22ec44, input=0x3eb660) at STRtree.cpp:243 #5 0x70516b2b in geos::index::strtree::STRtree::createParentBoundables ( this=0x22ec44, childBoundables=0x3eb660, newLevel=0) at STRtree.cpp:109 #6 0x7050c18b in geos::index::strtree::AbstractSTRtree::createHigherLevels ( this=0x22ec44, boundablesOfALevel=0x3eb660, level=-1) at AbstractSTRtree.cpp:100 #7 0x7050bcf5 in geos::index::strtree::AbstractSTRtree::build (this=0x22ec44) at AbstractSTRtree.cpp:60 #8 0x7050c3f8 in geos::index::strtree::AbstractSTRtree::query (this=0x22ec44, searchBounds=0x3eb720, matches=@0x22ea60) at AbstractSTRtree.cpp:125 #9 0x70599c27 in geos::index::strtree::STRtree::query (this=0x22ec44, searchEnv=0x3eb720, matches=@0x22ea60) at ../../source/headers/geos/index/strtree/STRtree.h:131 #10 0x7052e9d1 in geos::noding::MCIndexNoder::intersectChains (this=0x22ec30) at MCIndexNoder.cpp:75 #11 0x7052e808 in geos::noding::MCIndexNoder::computeNodes (this=0x22ec30, inputSegStrings=0x22ed90) at MCIndexNoder.cpp:54 #12 0x7052bb34 in geos::noding::FastNodingValidator::checkInteriorIntersections (this=0x22eda8) at FastNodingValidator.cpp:41 #13 0x7059b611 in geos::noding::FastNodingValidator::execute (this=0x22eda8) at ../../source/headers/geos/noding/FastNodingValidator.h:109 #14 0x7052c035 in geos::noding::FastNodingValidator::checkValid (this=0x22eda8) at FastNodingValidator.cpp:70 #15 0x7059f560 in geos::geomgraph::EdgeNodingValidator::checkValid ( this=0x22ed90) at ../../../source/headers/geos/geomgraph/EdgeNodingValidator.h:100 #16 0x7059f4bf in geos::geomgraph::EdgeNodingValidator::checkValid ( edges=@0x22f06c) at ../../../source/headers/geos/geomgraph/EdgeNodingValidator.h:88 #17 0x7055fbee in geos::operation::overlay::OverlayOp::computeOverlay ( this=0x22efd0, opCode=opINTERSECTION) at OverlayOp.cpp:703 #18 0x7055e522 in geos::operation::overlay::OverlayOp::getResultGeometry ( this=0x22efd0, funcCode=opINTERSECTION) at OverlayOp.cpp:188 #19 0x7055d2a7 in geos::operation::overlay::OverlayOp::overlayOp ( geom0=0x3e55d0, geom1=0x3e7a50, opCode=opINTERSECTION) at OverlayOp.cpp:94 #20 0x00431665 in geos::operation::overlay::overlayOp::operator() ( this=0x22f21c, g0=0x3e55d0, g1=0x3e7a50) at ../../source/headers/geos/operation/overlay/OverlayOp.h:344 #21 0x0042ff73 in geos::geom::BinaryOp<geos::operation::overlay::overlayOp> ( g0=0x3e55d0, g1=0x3e7a50, _Op={opCode = opINTERSECTION}) at ../../source/headers/geos/geom/BinaryOp.h:215 #22 0x0040af9a in XMLTester::parseTest (this=0x22feb0, node=0x3e5890) at XMLTester.cpp:1213 #23 0x00404956 in XMLTester::parseCase (this=0x22feb0, node=0x3e3058) at XMLTester.cpp:636 #24 0x00403072 in XMLTester::parseRun (this=0x22feb0, node=0x3e2c38) at XMLTester.cpp:427 #25 0x00402e73 in XMLTester::run (this=0x22feb0, source=@0x22fe90) at XMLTester.cpp:391 #26 0x0040d8a8 in main (argC=2, argV=0x3e4e40) at XMLTester.cpp:1450
Attachments (1)
Change History (5)
by , 15 years ago
Attachment: | fix-compare_double.patch added |
---|
comment:1 by , 15 years ago
I had made the patch for this problem. (I had reffered the c++ ML site(http://groups.google.com/group/comp.lang.c++/browse_thread/thread/2e1268fd88c40b5e?pli=1 ), and JTS 1.10)
I had confirmed that XMLTester run successfully on mingw-debug("-g")/release and msvc90-debug build, after apply the patch.
Regards,
comment:2 by , 15 years ago
How is:
return a<b;
Different from:
return (a < b) ? true
: (a > b) ? false
: false;
I really can't see it. Except maybe the latter takes the function out-of-line ?
comment:3 by , 15 years ago
strk,
The latter one use ternaly operation, but, sorry, the nest part("(a > b) ? false : false") have no means.
I had tried the following changes, and the crash didn't occurred.
From:
return a<b;
To(use variant):
bool res = a < b; return res;
Or To(use ternary operation):
return (a < b) ? true : false;
I don't know what is the reason above. (MinGW bug?)
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Alright, let's be nice with MingW. The patch was committed in r2685.
TortoiseSVN(Shift_JIS)