edbef83...
by
Jeroen Vermeulen <email address hidden>
New exception subclass: `protocol_violation`. (#687)
See #686. This is not a full implementatino of what is suggested there.
But it will enable a program to avoid the problem of catching a
`broken_connection` and retrying ad infniitum.
a315a21...
by
Jeroen Vermeulen <email address hidden>
Fix shellcheck run for out-of-tree runs. (#692)
eddcf21...
by
Jeroen Vermeulen <email address hidden>
Run shellcheck if available. (#690)
Also had to address some lint that shellcheck found.
38f1c5f...
by
Jeroen Vermeulen <email address hidden>
Update `config.guess`. (#689)
Really grateful for #688, but there's one problem: it's a lot of work to
review that entire script! There's some clear improvements, but also a
lot of more or less arbitrary changes.
Yes, yes, I know — the script comes from the GNU site, which we trust
all the time anyway. But how do I _know_ that it came from the GNU
site?
So here's a lazy shortcut: I download an update of known GNU provenance,
I merge that into the repo, and then hopefully the PR will resolve to a
tiny remaining diff. Or if we're lucky, none at all.
4fefd5f...
by
Jeroen Vermeulen <email address hidden>
Stop including `<ciso646>`. (#685)
Fixes #680.
C++17 compilers should not need this header. (Visual Studio complains
if we include this anyway, even if it's only in the case where the
file actually exists. It suggests a way to disable that warning, but
it does not seem to work.)
613f068...
by
Jeroen Vermeulen <email address hidden>
Fix "double free" crash when building as shared. (#683)
Fixes #681.
When building libpqxx as a shared library with gcc 12, any program that included libpqxx headers (with a few exceptions) would crash after `main()` returned.
There was an error message:
_free(): double free detected in tcache 2_
The problem turned out to be triggered by the inlining of any specialisation of `pqxx::type_name`, as we did in the macro `PQXX_DECLARE_ENUM_CONVERSION`. There's a header that uses that macro, thus triggering the problem.
I had to make enum `type_name` a `std::string_view`. This pains me. It changes the type of the variable. But gcc 12 (in a
shared-library build) won't let me get away with an `inline std::string` and clang won't let me get away with a none-`inline` `std::string`.
A `std::string_view` is easier — trivial destructor, no allocations.
7e22c80...
by
Jeroen Vermeulen <email address hidden>
Trailing spaces. (#679)
5b71ced...
by
Jeroen Vermeulen <email address hidden>
Fix `std::functional` problems. (#677)
Thanks @KayEss for pointing out that I shouldn't be using a `std::function` as a deleter for a `std::shared_ptr` or `std::unique_ptr`. Using ordinary function pointers instead.
I also worked around a bunch of gcc compile errors when I combined...
* The address sanitizer or "asan" (`-fsanitize=address`).
* Warnings as errors (`-Werror`).
* Uninitialized analyzer (`-Wanalyzer-use-of-uninitialized-value`).
The combination of audit mode (`--enable-audit` in the `configure` script) and maintainer mode (`--enable-maintainer-mode`
in the `configure` script) got us into exactly that combination.
It would seem that there's a problem with gcc. It doesn't happen in clang. I worked around it by replacing the one regex in the code with a manual parsing loop like I used to have.
e864d95...
by
Jeroen Vermeulen <email address hidden>