Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 504
    • Issues 504
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 52
    • Merge requests 52
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #2284

Closed
Open
Created Jan 24, 2022 by Thomas Markwalder@tmarkMaintainer

Postgresql bind array handling asserts when compiling with -Wp,-D_GLIBCXX_ASSERTIONS

Compiling with -Wp,-D_GLIBCXX_ASSERTIONS can cause asserts within Postgresql library, revolving around the vectors derived from PsqlBindArray which are passed into calls such as PQexecPrepared. At least one case can occur when the number of statement parameters is 0 and we pass in empty vectors (something we have done elsewhere without issue). PostgreSQL documentation says that one may pass in nul pointers when the number of parameters is zero and this does seem to avoid the problem.

The instigating case is a failed unit test:

[ RUN      ] PgSqlConfigBackendDHCPv4Test.createUpdateDeleteServer
/usr/include/c++/8/bits/stl_vector.h:950: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
/bin/bash: line 5: 30847 Aborted   
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking