[mapserver-commits] [MapServer/MapServer] 8a224f: oracle - Using dynamically allocated buffers for b...

Even Rouault noreply at github.com
Wed Apr 14 03:19:15 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/MapServer/MapServer
  Commit: 8a224fcbec1a2036c8a0ffeefbf05ee4a377c8df
      https://github.com/MapServer/MapServer/commit/8a224fcbec1a2036c8a0ffeefbf05ee4a377c8df
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M maporaclespatial.c

  Log Message:
  -----------
  oracle - Using dynamically allocated buffers for building queries


  Commit: 90b3855202e41db8574c29c2cb298807abab23b5
      https://github.com/MapServer/MapServer/commit/90b3855202e41db8574c29c2cb298807abab23b5
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M maporaclespatial.c

  Log Message:
  -----------
  removing former snprintf call which messes up the query_str pointer


  Commit: 7631bd9f475f7259644cca0a2d074d38e5a3cfaa
      https://github.com/MapServer/MapServer/commit/7631bd9f475f7259644cca0a2d074d38e5a3cfaa
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M maporaclespatial.c

  Log Message:
  -----------
  oracle - fixing memleak

this has been revealed using valgrind, before the patch (output
voluntarily truncated):

```
==1959886== 731 bytes in 1 blocks are definitely lost in loss record 193 of 272
==1959886==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==1959886==    by 0x48E155E: msSplitData (maporaclespatial.c:366)
==1959886==    by 0x48ED06B: msOracleSpatialLayerTranslateFilter (maporaclespatial.c:3574)
==1959886==
==1959886== 731 bytes in 1 blocks are definitely lost in loss record 194 of 272
==1959886==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==1959886==    by 0x48E1577: msSplitData (maporaclespatial.c:367)
==1959886==    by 0x48ED06B: msOracleSpatialLayerTranslateFilter (maporaclespatial.c:3574)
==1959886==
==1959886== 731 bytes in 1 blocks are definitely lost in loss record 195 of 272
==1959886==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==1959886==    by 0x48E1590: msSplitData (maporaclespatial.c:368)
==1959886==    by 0x48ED06B: msOracleSpatialLayerTranslateFilter (maporaclespatial.c:3574)
==1959886==
==1959886== 731 bytes in 1 blocks are definitely lost in loss record 196 of 272
==1959886==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==1959886==    by 0x48E15A9: msSplitData (maporaclespatial.c:369)
==1959886==    by 0x48ED06B: msOracleSpatialLayerTranslateFilter (maporaclespatial.c:3574)
==1959886==
==1959886== 2,000 bytes in 1 blocks are definitely lost in loss record 224 of 272
==1959886==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==1959886==    by 0x48ED030: msOracleSpatialLayerTranslateFilter (maporaclespatial.c:3573)
==1959886==    by 0x49896C7: msLayerTranslateFilter (maplayer.c:277)
==1959886==    by 0x498970D: msLayerWhichShapes (maplayer.c:293)
==1959886==    by 0x49BDA0E: msDrawVectorLayer (mapdraw.c:993)
==1959886==    by 0x49BD069: msDrawLayer (mapdraw.c:820)
==1959886==    by 0x49BBBA5: msDrawMap (mapdraw.c:397)
==1959886==    by 0x48FE8F4: msWMSGetMap (mapwms.c:3977)
==1959886==    by 0x4903BC6: msWMSDispatch (mapwms.c:5350)
==1959886==    by 0x4917DC8: msOWSDispatch (mapows.c:289)
==1959886==    by 0x4925ADD: msCGIDispatchRequest (mapservutil.c:1709)
==1959886==    by 0x10979C: main (mapserv.c:283)

```

After:

```
[...]
==1961590== 139,264 bytes in 1 blocks are possibly lost in loss record 266 of 267
==1961590==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==1961590==    by 0x5D5A380: slwmmgetmem (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D5A118: lmmstvrt (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D58AB1: lmmstchnk (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D59F9D: lmmstsml (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x761F5C9: lmmstmalloc (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x761EBF5: lmmmalloc (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D56A54: lmmcis (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D5B9E0: lpmpali (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D5AC8C: lpminitm (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D5AA73: lpminit (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==    by 0x5D3F34F: lfvLoadPkg (in /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1)
==1961590==
==1961590== LEAK SUMMARY:
==1961590==    definitely lost: 46 bytes in 1 blocks
==1961590==    indirectly lost: 0 bytes in 0 blocks
==1961590==      possibly lost: 139,648 bytes in 3 blocks
==1961590==    still reachable: 832,783 bytes in 275 blocks
==1961590==         suppressed: 0 bytes in 0 blocks
==1961590== Reachable blocks (those to which a pointer was found) are not shown.
==1961590== To see them, rerun with: --leak-check=full --show-leak-kinds=all
```

The remaining leaks are as above due to the oracle client library.


  Commit: 8c77d5daa4b9f01c1a4563911cd57245b06739bd
      https://github.com/MapServer/MapServer/commit/8c77d5daa4b9f01c1a4563911cd57245b06739bd
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M maporaclespatial.c

  Log Message:
  -----------
  some minor changes in the comments


  Commit: f89fc5d7e168a88fce98f3170c4be894e619a32d
      https://github.com/MapServer/MapServer/commit/f89fc5d7e168a88fce98f3170c4be894e619a32d
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    A msautotest/msoracle/oracle.map
    A msautotest/msoracle/run_test.py
    A msautotest/msoracle/tnsnames.ora

  Log Message:
  -----------
  oracle - adding a msautotest embryo for msoracle tests


  Commit: 4f3a2e74cfd33cf89f7fe65e0706001d1d05683d
      https://github.com/MapServer/MapServer/commit/4f3a2e74cfd33cf89f7fe65e0706001d1d05683d
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

  Changed paths:
    A msautotest/msoracle/README.md
    A msautotest/msoracle/docker-compose.yaml
    A msautotest/msoracle/expected/oracle.png
    M msautotest/msoracle/oracle.map
    A msautotest/msoracle/sample-data.sql
    M msautotest/msoracle/tnsnames.ora

  Log Message:
  -----------
  oracle - using suggested docker image for qgis project to make testing easier


  Commit: f87134024d5954ea116856cde6dc910a2b2d4f64
      https://github.com/MapServer/MapServer/commit/f87134024d5954ea116856cde6dc910a2b2d4f64
  Author: Pierre Mauduit <pierre.mauduit at camptocamp.com>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M maporaclespatial.c

  Log Message:
  -----------
  msoracle - taking into account Even's feedback

Note: the unused parameters have already been removed in main, this was
a mistake when I rebased my working branch onto main.


  Commit: ba2211fae112ee0ca010d9f1b757a6d91f4cf4cf
      https://github.com/MapServer/MapServer/commit/ba2211fae112ee0ca010d9f1b757a6d91f4cf4cf
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M maporaclespatial.c
    A msautotest/msoracle/README.md
    A msautotest/msoracle/docker-compose.yaml
    A msautotest/msoracle/expected/oracle.png
    A msautotest/msoracle/oracle.map
    A msautotest/msoracle/run_test.py
    A msautotest/msoracle/sample-data.sql
    A msautotest/msoracle/tnsnames.ora

  Log Message:
  -----------
  Merge pull request #6282 from pmauduit/dynamic-buffer-oracle-spatial-main

maporacle - using dynamically-allocated buffers for constructing SQL queries


Compare: https://github.com/MapServer/MapServer/compare/d1e7c99fd190...ba2211fae112


More information about the mapserver-commits mailing list