[postgis-tickets] [PostGIS] #4118: Memory sanitizer warnings

PostGIS trac at osgeo.org
Fri Jul 27 04:56:02 PDT 2018


#4118: Memory sanitizer warnings
-------------------------+---------------------------
  Reporter:  Algunenano  |      Owner:  Algunenano
      Type:  defect      |     Status:  closed
  Priority:  medium      |  Milestone:  PostGIS 2.5.0
 Component:  postgis     |    Version:  trunk
Resolution:  fixed       |   Keywords:
-------------------------+---------------------------
Changes (by Algunenano):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 The only pending warnings are related to json-c (cu_in_geojson.c) and one
 that looks like an issue in GEOS:
 {{{
 Suite: geometry_clean
   Test: test_lwgeom_make_valid ...Uninitialized bytes in
 __interceptor_memcmp at offset 0 inside [0x7ffe9a5bc230, 256)
 ==11015==WARNING: MemorySanitizer: use-of-uninitialized-value
     #0 0x7f3e496ef4cc in std::ctype<char>::_M_widen_init() const
 /build/gcc/src/gcc/libstdc++-v3/src/c++11/ctype.cc:98:25
     #1 0x7f3e4974d208 in std::ctype<char>::widen(char) const
 /build/gcc/src/gcc-build/x86_64-pc-linux-
 gnu/libstdc++-v3/include/bits/locale_facets.h:876:21
     #2 0x7f3e4974d208 in std::basic_ios<char, std::char_traits<char>
 >::widen(char) const /build/gcc/src/gcc-build/x86_64-pc-linux-
 gnu/libstdc++-v3/include/bits/basic_ios.h:450:49
     #3 0x7f3e4974d208 in std::basic_ios<char, std::char_traits<char>
 >::fill() const /build/gcc/src/gcc-build/x86_64-pc-linux-
 gnu/libstdc++-v3/include/bits/basic_ios.h:374:14
     #4 0x7f3e4974d208 in std::ostream&
 std::ostream::_M_insert<double>(double) /build/gcc/src/gcc-build/x86_64
 -pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:73:49
     #5 0x7f3e49bf215c in geos::geom::operator<<(std::ostream&,
 geos::geom::Coordinate const&) /home/raul/dev/PKGBUILDs/geos-
 git/src/geos/src/geom/Coordinate.cpp:51:6
     #6 0x7f3e49bf2086 in geos::geom::Coordinate::toString[abi:cxx11]()
 const /home/raul/dev/PKGBUILDs/geos-
 git/src/geos/src/geom/Coordinate.cpp:43:29
     #7 0x7f3e49d1a679 in
 geos::operation::valid::TopologyValidationError::toString[abi:cxx11]()
 /home/raul/dev/PKGBUILDs/geos-
 git/src/geos/src/operation/valid/TopologyValidationError.cpp:83:61
     #8 0x7f3e4b66b858 in GEOSisValid_r /home/raul/dev/PKGBUILDs/geos-
 git/src/geos/capi/geos_ts_c.cpp:939:46
     #9 0x7f3e4b66622f in GEOSisValid /home/raul/dev/PKGBUILDs/geos-
 git/src/geos/capi/geos_c.cpp:242:12
     #10 0x7f3e4bb2821a in LWGEOM_GEOS_makeValid
 /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos_clean.c:711:13
     #11 0x7f3e4bb2b53e in lwgeom_make_valid
 /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos_clean.c:888:12
     #12 0x556972fae6b4 in test_lwgeom_make_valid
 /home/raul/dev/public/postgis/liblwgeom/cunit/cu_clean.c:55:9
     #13 0x7f3e4b437117  (/usr/lib/libcunit.so.1+0x4117)
     #14 0x7f3e4b4373b1  (/usr/lib/libcunit.so.1+0x43b1)
     #15 0x7f3e4b4377b6 in CU_run_all_tests (/usr/lib/libcunit.so.1+0x47b6)
     #16 0x556973060757 in main
 /home/raul/dev/public/postgis/liblwgeom/cunit/cu_tester.c:177:13
     #17 0x7f3e4a4c306a in __libc_start_main (/usr/lib/libc.so.6+0x2306a)
     #18 0x556972f24db9 in _start
 (/home/raul/dev/public/postgis/liblwgeom/cunit/.libs/lt-cu_tester+0x24db9)

   Uninitialized value was created by an allocation of 'yyvsa' in the stack
 frame of function 'wkt_yyparse'
     #0 0x7f3e4b9c7580 in wkt_yyparse
 /home/raul/dev/public/postgis/liblwgeom/lwin_wkt_parse.c:1634

 SUMMARY: MemorySanitizer: use-of-uninitialized-value
 /build/gcc/src/gcc/libstdc++-v3/src/c++11/ctype.cc:98:25 in
 std::ctype<char>::_M_widen
 }}}

 I'm closing this for now. At some point in the future I'll try to look
 into these and report them upstream.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4118#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list