Download raw body.
devel/boost: backport a regression fix to 1.91.0
On Mon, 14 Sep 2026 15:01:46 +0200,
Theo Buehler <tb@theobuehler.org> wrote:
>
> On Mon, Sep 14, 2026 at 02:32:22PM +0200, Sergii Rudchenko wrote:
> > On 9/14/26 10:44 AM, Stuart Henderson wrote:
> > > please use "make update-patches" to generate the patch files; from what
> > you
> > > have now, "make clean; make patch; rm
> > > patches/patch-libs_url_base_edit_params; make update-patches".
> >
> > Thank you, the updated ports diff is below.
> >
> > I am not sure if it is worth including the patches for units tests as they
> > have
> > no effect on the resulting package. Leaving it to the committer to decide
> > whether to delete patch-libs_url_test_unit_params_encoded_ref_cpp and
> > patch-libs_url_test_unit_params_ref_cpp.
>
> There are some whitespace issues in both your diffs and hence they don't
> apply. Here's one that does apply. I think we should only commit the
> actual code change.
>
> Brad, are you ok with that?
>
I'd like to add this diff to our boost as well:
https://marc.info/?l=openbsd-ports&m=178886522527685&w=2
The resulted diff for ports is here, and I just started a whole bulk with
it. I do not expect that any of two diffs has any impact and run it just in case.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/boost/Makefile,v
diff -u -p -r1.163 Makefile
--- Makefile 18 May 2026 05:48:17 -0000 1.163
+++ Makefile 14 Sep 2026 13:18:08 -0000
@@ -13,6 +13,8 @@ CATEGORIES= devel
SITES= https://archives.boost.io/release/${VERSION}/source/
EXTRACT_SUFX= .tar.bz2
+REVISION-main= 0
+
SO_VERSION= 27.0
BOOST_LIBS= boost_atomic-mt \
boost_charconv-mt boost_charconv \
Index: patches/patch-boost_dll_detail_posix_program_location_impl_hpp
===================================================================
RCS file: patches/patch-boost_dll_detail_posix_program_location_impl_hpp
diff -N patches/patch-boost_dll_detail_posix_program_location_impl_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-boost_dll_detail_posix_program_location_impl_hpp 14 Sep 2026 13:18:08 -0000
@@ -0,0 +1,36 @@
+Add support of getexecpath()
+
+Index: boost/dll/detail/posix/program_location_impl.hpp
+--- boost/dll/detail/posix/program_location_impl.hpp.orig
++++ boost/dll/detail/posix/program_location_impl.hpp
+@@ -96,6 +96,30 @@ namespace boost { namespace dll { namespace detail {
+
+
+
++#elif BOOST_OS_BSD_OPEN
++
++#if !defined(BOOST_DLL_INTERFACE_UNIT)
++#include <errno.h>
++#include <limits.h>
++#include <unistd.h>
++#endif // !defined(BOOST_DLL_INTERFACE_UNIT)
++
++namespace boost { namespace dll { namespace detail {
++ inline boost::dll::fs::path program_location_impl(std::error_code& ec) {
++ ec.clear();
++
++ char path[PATH_MAX];
++ if (getexecpath(path, sizeof(path)) != 0) {
++ ec = std::make_error_code(
++ static_cast<std::errc>(errno)
++ );
++ return boost::dll::fs::path();
++ }
++
++ return boost::dll::fs::path(path);
++ }
++}}} // namespace boost::dll::detail
++
+ #elif BOOST_OS_BSD_NET
+
+ namespace boost { namespace dll { namespace detail {
Index: patches/patch-boost_url_impl_url_base_hpp
===================================================================
RCS file: patches/patch-boost_url_impl_url_base_hpp
diff -N patches/patch-boost_url_impl_url_base_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-boost_url_impl_url_base_hpp 14 Sep 2026 13:18:08 -0000
@@ -0,0 +1,49 @@
+Fix for URL corruption bug on url.params().append() in Boost 1.91.0
+
+https://github.com/boostorg/url/issues/990
+https://github.com/boostorg/url/pull/990
+
+Index: boost/url/impl/url_base.hpp
+--- boost/url/impl/url_base.hpp.orig
++++ boost/url/impl/url_base.hpp
+@@ -3159,7 +3159,12 @@ edit_params(
+ BOOST_ASSERT(pos1 <= impl_.offset(id_frag));
+
+ // calc decoded size of old range,
+- // minus one if '?' or '&' prefixed
++ // minus one for the leading '?' which is
++ // not counted in decoded_[id_query].
++ // dn0 may be -1 here when the old range is
++ // empty and the query was non-empty; the
++ // matching subtraction on dn below cancels
++ // that out when the delta is taken.
+ auto dn0 =
+ static_cast<std::ptrdiff_t>(
+ detail::decode_bytes_unsafe(
+@@ -3168,8 +3173,6 @@ edit_params(
+ pos1 - pos0)));
+ if(impl_.len(id_query) > 0)
+ dn0 -= 1;
+- if(dn0 < 0)
+- dn0 = 0;
+
+ //------------------------------------------------
+ //
+@@ -3267,16 +3270,13 @@ edit_params(
+ }
+ }
+
+- // calc decoded size of new range,
+- // minus one if '?' or '&' prefixed
++ // calc decoded size of new range; see dn0.
+ auto dn =
+ static_cast<std::ptrdiff_t>(
+ detail::decode_bytes_unsafe(
+ core::string_view(dest0, dest - dest0)));
+ if(impl_.len(id_query) > 0)
+ dn -= 1;
+- if(dn < 0)
+- dn = 0;
+
+ if(dn >= dn0)
+ impl_.decoded_[id_query] +=
--
wbr, Kirill
devel/boost: backport a regression fix to 1.91.0