[pdal-commits] [PDAL/PDAL] 83e9ee: revert the explicitly deleted behavior of these fu...

GitHub noreply at github.com
Tue May 20 07:05:05 PDT 2014


  Branch: refs/heads/point-context
  Home:   https://github.com/PDAL/PDAL
  Commit: 83e9eeb9c6f1d9e278af55a8b8ef610f1896ffb2
      https://github.com/PDAL/PDAL/commit/83e9eeb9c6f1d9e278af55a8b8ef610f1896ffb2
  Author: Bradley J Chambers <brad.chambers at gmail.com>
  Date:   2014-05-16 (Fri, 16 May 2014)

  Changed paths:
    M include/pdal/filters/Scaling.hpp

  Log Message:
  -----------
  revert the explicitly deleted behavior of these functions, unavailable on MSVC2012


  Commit: b9dfa798181720ebf886ee553911ae1be5f714df
      https://github.com/PDAL/PDAL/commit/b9dfa798181720ebf886ee553911ae1be5f714df
  Author: Pete Gadomski <pete.gadomski at gmail.com>
  Date:   2014-05-19 (Mon, 19 May 2014)

  Changed paths:
    M CMakeLists.txt
    M src/drivers/pgpointcloud/Reader.cpp
    M src/drivers/pgpointcloud/Writer.cpp
    M test/unit/CMakeLists.txt
    A test/unit/drivers/pgpointcloud/PgpointcloudWriterTest.cpp
    A test/unit/drivers/pgpointcloud/Support.hpp.in

  Log Message:
  -----------
  Check for null pointers when using pg_query_once

`pdal::drivers::pgpointcloud::pg_query_once` is C-ish -- it returns a
raw `char *` from `strdup`. In our driver code, we were not checking
that pointer against `NULL`, which lead to PDAL crashing when the target
postgres database existed, but did not have the [`pointcloud`
extension](https://github.com/pramsey/pointcloud) installed.

This patch updates all uses of `pg_query_once` in the codebase with a
check for pointer validity, throwing a `pdal_error` if the returned
pointer is `NULL`. Note that other functions in
`include/pdal/drivers/pgpointcloud/common.hpp` also return raw pointers,
but their usage has not been checked or modified for this patch, due
primarily to developer laziness but rationalized as commendable commit
cleanliness/avoidance of mission creep.

This patch also adds a test harness for the pgpointcloud drivers, which
helped verify the correctness of the fix. Since the unit tests require a
running postgres instance with a already-created database, the postgres
unit tests are disabled by default. They can be enabled by enabling the
dependent cmake option `WITH_PGPOINTCLOUD_TESTS`. The database
connection parameters can then be configured with CMake variables.

I think it would be better to allow configuration of the postgres test
database with some sort of configuration file (so a change to the
postgres test database configuration didn't require a rebuild), but
leveraging the existing CMake configuration system was quicker than
doing my own config parsing.

Fixes #292.


  Commit: 5a3eebf289c17057869ba276953a0ad45e98bcb9
      https://github.com/PDAL/PDAL/commit/5a3eebf289c17057869ba276953a0ad45e98bcb9
  Author: Pete Gadomski <pete.gadomski at gmail.com>
  Date:   2014-05-19 (Mon, 19 May 2014)

  Changed paths:
    M include/pdal/filters/PCLBlock.hpp
    M src/filters/PCLBlock.cpp

  Log Message:
  -----------
  Remove unused variable m_pclblockFilter

clang-503.0.40 was complaining about an unused member variable in
`pdal::filters::iterators::sequential::PCLBlock`.


  Commit: 920f43d7a314d0630a4af39187545ee0ade9980b
      https://github.com/PDAL/PDAL/commit/920f43d7a314d0630a4af39187545ee0ade9980b
  Author: Howard Butler <howard at hobu.co>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M include/pdal/filters/PCLBlock.hpp
    M src/filters/PCLBlock.cpp

  Log Message:
  -----------
  Merge pull request #370 from gadomski/pcl-block-unused-member-var

Remove unused variable m_pclblockFilter


  Commit: 93283dd667d1d30fc510a15fd906626fcad15da7
      https://github.com/PDAL/PDAL/commit/93283dd667d1d30fc510a15fd906626fcad15da7
  Author: Howard Butler <howard at hobu.co>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M CMakeLists.txt
    M src/drivers/pgpointcloud/Reader.cpp
    M src/drivers/pgpointcloud/Writer.cpp
    M test/unit/CMakeLists.txt
    A test/unit/drivers/pgpointcloud/PgpointcloudWriterTest.cpp
    A test/unit/drivers/pgpointcloud/Support.hpp.in

  Log Message:
  -----------
  Merge pull request #369 from gadomski/issue/292-postgres-segfault

Check for null pointers when using pg_query_once


  Commit: 6f13284138d0cd19e2e9eacc0313335ead4ef9d4
      https://github.com/PDAL/PDAL/commit/6f13284138d0cd19e2e9eacc0313335ead4ef9d4
  Author: Howard Butler <howard at hobu.co>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M include/pdal/filters/Scaling.hpp

  Log Message:
  -----------
  Merge pull request #360 from chambbj/issues/358-explicitly-deleted-fcns

revert the explicitly deleted behavior of these functions, unavailable on MSVC2012


  Commit: dfb3574da5d198b0cb3b010be39135cf35458ff8
      https://github.com/PDAL/PDAL/commit/dfb3574da5d198b0cb3b010be39135cf35458ff8
  Author: Howard Butler <hobu.inc at gmail.com>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M include/pdal/filters/PCLBlock.hpp
    M src/filters/PCLBlock.cpp

  Log Message:
  -----------
  Revert "Remove unused variable m_pclblockFilter"

This reverts commit 5a3eebf289c17057869ba276953a0ad45e98bcb9.


  Commit: 60cf902e0c8ffd8bfec74f0235c9dee49924d617
      https://github.com/PDAL/PDAL/commit/60cf902e0c8ffd8bfec74f0235c9dee49924d617
  Author: Andrew Bell <andrew.bell.ia at gmail.com>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M CMakeLists.txt
    M include/pdal/filters/PCLBlock.hpp
    M include/pdal/filters/Scaling.hpp
    M src/drivers/pgpointcloud/Reader.cpp
    M src/drivers/pgpointcloud/Writer.cpp
    M src/filters/PCLBlock.cpp
    M test/unit/CMakeLists.txt
    A test/unit/drivers/pgpointcloud/PgpointcloudWriterTest.cpp
    A test/unit/drivers/pgpointcloud/Support.hpp.in

  Log Message:
  -----------
  Merge branch 'master' of https://github.com/PDAL/PDAL into point-context

Conflicts:
	include/pdal/filters/PCLBlock.hpp
	include/pdal/filters/Scaling.hpp


  Commit: 5edbe64e4d322059defa0f399f473067af1f6523
      https://github.com/PDAL/PDAL/commit/5edbe64e4d322059defa0f399f473067af1f6523
  Author: Andrew Bell <andrew.bell.ia at gmail.com>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M include/pdal/filters/PCLBlock.hpp
    M src/filters/PCLBlock.cpp

  Log Message:
  -----------
  Merge branch 'master' of https://github.com/PDAL/PDAL into point-context


Compare: https://github.com/PDAL/PDAL/compare/41e2a158e17d...5edbe64e4d32


More information about the pdal-commits mailing list