Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS fixes #1

Closed
wants to merge 12 commits into from
Closed

NAS fixes #1

wants to merge 12 commits into from

Conversation

jef-n
Copy link
Contributor

@jef-n jef-n commented Oct 13, 2012

some bug fixes and improvements to the nas driver

jef-n added 10 commits October 13, 2012 12:54
- handle CompositeCurve like MultiCurve (for NAS)
- remove duplicate points in rings
- add OGR_ARC_MINLENGTH to limit the number of segments in interpolated arcs
…ully

numeric values are assigned to numeric fields
- Skip elements "zeigtAufExternes" and "objektkoordinaten" (fixes PostNAS OSGeo#3 and OSGeo#15)
- issue a warning when geometry is overwritten, invalid geometry is found or featureless geometry appears
- issue a debug message when a existing attribute is overwritten (to catch array)
- use forceToLineString() on line strings (fixes PostNAS OSGeo#18)
- also handle MultiCurve and CompositeCurve
- merge multilinestrings
@rouault
Copy link
Member

rouault commented Oct 13, 2012

  1. jef-n@96fa98f is wrong.
    CSLTestBoolean( CPLGetConfigOption( "OGR_SETFIELD_NUMERIC_WARNING", 0 ) ) should be CSLTestBoolean( CPLGetConfigOption( "OGR_SETFIELD_NUMERIC_WARNING", "NO" ) ), otherwise if OGR_SETFIELD_NUMERIC_WARNING isn't defined, it segfaults

  2. and ogr_nas_2 fails (probably needs updating expected result due to the geometry changes)

@rouault
Copy link
Member

rouault commented Oct 13, 2012

Committed in SVN, except jef-n@b351343 that contains stuff whose I'm unsure (particularly ICONV stuff shouldn't be by default enabled in nmake.opt, because anyone should be able to compile GDAL without any dependency)

@rouault rouault closed this Oct 13, 2012
rouault pushed a commit that referenced this pull request Sep 24, 2014
rouault pushed a commit that referenced this pull request Nov 7, 2015
CID 1338309 (#1 of 1): Structurally dead code (UNREACHABLE)
unreachable: Since the loop increment i++; is unreachable, the loop
body will never execute more than once

By testing if poSource is a nullptr first and returning an error if it
is a nullptr, I think the logic is much easier to follow.  I misread 
the logic here:

https://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/vrt/vrtsourcedrasterband.cpp?rev=31122#L1400

and created r31355 that got it wrong.


git-svn-id: https://svn.osgeo.org/gdal/trunk@31361 f0d54148-0727-0410-94bb-9a71ac55c965
rouault pushed a commit that referenced this pull request Jul 22, 2016
…ure.cpp:IsPowerOf2().

Coverity - Overflowed return value.

2. overflow: Subtract operation overflows on operands nTmp and 1U.
   	     
CID 164965 (#1 of 1): Overflowed return value (INTEGER_OVERFLOW)

3. overflow_sink: Overflowed or truncated value (or a value computed from an
overflowed or truncated value) nTmp != 0U && (nTmp & nTmp - 1U) == 0U used as
return value.


git-svn-id: https://svn.osgeo.org/gdal/trunk@34758 f0d54148-0727-0410-94bb-9a71ac55c965
rouault pushed a commit that referenced this pull request Jul 22, 2016
…Gauss().

CID 164953 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
  var_deref_op: Dereferencing null pointer aEntries.

Triggered in out of memory conditions.


git-svn-id: https://svn.osgeo.org/gdal/trunk@34761 f0d54148-0727-0410-94bb-9a71ac55c965
rouault pushed a commit that referenced this pull request Oct 11, 2016
CID 171740 (#1 of 1): Dereference before null check (REVERSE_INULL)


git-svn-id: https://svn.osgeo.org/gdal/trunk@35687 f0d54148-0727-0410-94bb-9a71ac55c965
rouault added a commit that referenced this pull request Mar 8, 2018
This should perhaps help fixing, or at least workarounding, the following
issue seen randomly on the gcc52_stdcpp14_sanitize Travis-CI target.

e.g on https://api.travis-ci.org/v3/job/351015753/log.txt

Running gdrivers/gdalhttp.py...
  TEST: http_1 ... success
ERROR 1: Range downloading not supported by this server!
ERROR 1: Request for 8-407 failed
  TEST: http_2 ... success
  TEST: http_3 ... success
ERROR 4: `/vsicurl/ftp://download.osgeo.org/gdal/data/gtiff/utm.tif' not recognized as a supported file format.
  TEST: http_4 ... HTTP service for ftp://download.osgeo.org/gdal/data/gtiff/utm.tif is down (HTTP Error: ftp error: 425 Security: Bad IP connecting.)
cannot open URL
skip
  TEST: http_5 ... success
ERROR 1: JSON parsing error: unexpected character (at offset 0)
  TEST: http_6 ... success
==31274==WARNING: AddressSanitizer failed to allocate 0x62d00019040f bytes
==31274==AddressSanitizer's allocator is terminating the process instead of returning 0
==31274==If you don't like this behavior set allocator_may_return_null=1
==31274==AddressSanitizer CHECK failed: ../../.././libsanitizer/sanitizer_common/sanitizer_allocator.cc:147 "((0)) != (0)" (0x0, 0x0)
    #0 0x7f3f527259f4  (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0x9e9f4)
    #1 0x7f3f5272a453 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0xa3453)
    #2 0x7f3f526a7461  (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0x20461)
    #3 0x7f3f527286d5  (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0xa16d5)
    #4 0x7f3f526acb3d  (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0x25b3d)
    #5 0x7f3f526adbd5  (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0x26bd5)
    #6 0x7f3f5271e32e in realloc (/home/travis/build/OSGeo/gdal/install-gcc-5.2.0/lib64/libasan.so.2.0.0+0x9732e)
    #7 0x7f3f3ea2a940 in VSIRealloc /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsisimple.cpp:814
    #8 0x7f3f3e8e3958 in VSICurlHandleWriteFunc /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsil_curl.cpp:839
    #9 0x7f3f2ff61442 in Curl_client_write (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x16442)
    #10 0x7f3f2ff8bc46 in Curl_pp_readresp (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x40c46)
    #11 0x7f3f2ff621ab  (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x171ab)
    #12 0x7f3f2ff64546  (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x19546)
    #13 0x7f3f2ff61bbf  (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x16bbf)
    #14 0x7f3f2ff61cd1  (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x16cd1)
    #15 0x7f3f2ff6776b in Curl_disconnect (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x1c76b)
    #16 0x7f3f2ff7c170 in curl_multi_cleanup (/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4+0x31170)
    #17 0x7f3f3e902c6b in ClearCache /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsil_curl.cpp:2913
    #18 0x7f3f3e8fc9f7 in ~VSICurlFilesystemHandler /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsil_curl.cpp:2564
    #19 0x7f3f3e8fcf23 in ~VSICurlFilesystemHandler /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsil_curl.cpp:2569
    #20 0x7f3f3e9e4a02 in VSIFileManager::~VSIFileManager() /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsil.cpp:1805
    #21 0x7f3f3e9e5baa in VSICleanupFileManager /home/travis/build/OSGeo/gdal/gdal/port/cpl_vsil.cpp:1966
    #22 0x7f3f3e533e42 in GDALDriverManager::~GDALDriverManager() /home/travis/build/OSGeo/gdal/gdal/gcore/gdaldrivermanager.cpp:262
    #23 0x7f3f3e53418d in GDALDriverManager::~GDALDriverManager() /home/travis/build/OSGeo/gdal/gdal/gcore/gdaldrivermanager.cpp:329
    #24 0x7f3f3e53a14e in GDALDestroyDriverManager /home/travis/build/OSGeo/gdal/gdal/gcore/gdaldrivermanager.cpp:898
    #25 0x7f3f27794ea3 in ffi_call_unix64 (/usr/lib/python2.7/lib-dynload/_ctypes.so+0x1aea3)
    #26 0x7f3f277948c4 in ffi_call (/usr/lib/python2.7/lib-dynload/_ctypes.so+0x1a8c4)
    #27 0x7f3f277852c1 in _ctypes_callproc (/usr/lib/python2.7/lib-dynload/_ctypes.so+0xb2c1)
    #28 0x7f3f27785aa1  (/usr/lib/python2.7/lib-dynload/_ctypes.so+0xbaa1)
    #29 0x4c2645 in PyObject_Call (/usr/bin/python2.7+0x4c2645)
    #30 0x537589 in PyEval_EvalFrameEx (/usr/bin/python2.7+0x537589)
    #31 0x5376f1 in PyEval_EvalFrameEx (/usr/bin/python2.7+0x5376f1)
    #32 0x5376f1 in PyEval_EvalFrameEx (/usr/bin/python2.7+0x5376f1)
    #33 0x53e2af in PyEval_EvalCodeEx (/usr/bin/python2.7+0x53e2af)
    #34 0x536c45 in PyRun_StringFlags (/usr/bin/python2.7+0x536c45)
    #35 0x53ecb4 in PyRun_SimpleStringFlags (/usr/bin/python2.7+0x53ecb4)
    #36 0x51e62d in Py_Main (/usr/bin/python2.7+0x51e62d)
    #37 0x7f3f504657ec in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x217ec)
    #38 0x41bad0  (/usr/bin/python2.7+0x41bad0)




git-svn-id: https://svn.osgeo.org/gdal/trunk@41669 f0d54148-0727-0410-94bb-9a71ac55c965
lucianpls added a commit that referenced this pull request Jul 18, 2018
yoichigmf referenced this pull request in yoichigmf/gdal Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants