All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: Re: [Buildroot] [PATCH v2 01/14] package/boost: fix asio.hpp compile errors with gcc >= 15
Date: Tue, 27 Oct 2026 20:07:52 +0100	[thread overview]
Message-ID: <auD2H0OMhmukAv4h@windsurf> (raw)
In-Reply-To: <20261027164013.1602502-1-adam.duskett@amarulasolutions.com>

Hello,

On Tue, Oct 27, 2026 at 05:39:58PM +0100, Adam Duskett wrote:
> This commit unintentionally fixed a compile error when programs
> include the asio.hpp header with gcc versions >= 15.
> 
> ```
> In function ‘void* memcpy(void*, const void*, size_t)’,
> 
> inlined from ‘static boost::asio::ip::basic_resolver_results<InternetProtocol>
>     boost::asio::ip::basic_resolver_results<InternetProtocol>::create(boost::asio::detail::addrinfo_type*,
>     const std::string&, const std::string&) [with InternetProtocol = boost::asio::ip::tcp]’
>     at /usr/include/boost/asio/ip/basic_resolver_results.hpp:147:15:
> 
> /usr/include/bits/string_fortified.h:29:33:
>     error: ‘void* __builtin___memcpy_chk(void*, const void*, unsigned int, unsigned int)’
>     forming offset [28, 128] is out of the bounds [0, 28] of object ‘endpoint’ with type
>     ‘boost::asio::ip::tcp::endpoint’ {aka ‘boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>’}
>     [-Werror=array-bounds=]
> ```
> 
> Backport URL: https://github.com/boostorg/asio/commit/b2478a9ba9ed76d7c858419e3f677cc454591d45
> 
> Fixes: None reported
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>

Thanks, I've applied, after doing minor tweaks to the patch, see
below.

> diff --git a/package/boost/0002-remove-FORTIFY_SOURCE-workaround.patch b/package/boost/0002-remove-FORTIFY_SOURCE-workaround.patch
> new file mode 100644
> index 0000000000..d044b62676
> --- /dev/null
> +++ b/package/boost/0002-remove-FORTIFY_SOURCE-workaround.patch
> @@ -0,0 +1,75 @@
> +From b3d87da5f87e2907ed004edf1c72ad3942ff1165 Mon Sep 17 00:00:00 2001
> +From: Christopher Kohlhoff <chris@kohlhoff.com>
> +Date: Wed, 5 Aug 2026 16:07:19 +0200
> +Subject: [PATCH] Remove _FORTIFY_SOURCE workaround.
> +
> +This commit unintentionally fixed a compile error when programs
> +include the asio.hpp header with gcc versions >= 15.
> +
> +```
> +In function ‘void* memcpy(void*, const void*, size_t)’,
> +
> +inlined from ‘static boost::asio::ip::basic_resolver_results<InternetProtocol>
> +    boost::asio::ip::basic_resolver_results<InternetProtocol>::create(boost::asio::detail::addrinfo_type*,
> +    const std::string&, const std::string&) [with InternetProtocol = boost::asio::ip::tcp]’
> +    at /usr/include/boost/asio/ip/basic_resolver_results.hpp:147:15:
> +
> +/usr/include/bits/string_fortified.h:29:33:
> +    error: ‘void* __builtin___memcpy_chk(void*, const void*, unsigned int, unsigned int)’
> +    forming offset [28, 128] is out of the bounds [0, 28] of object ‘endpoint’ with type
> +    ‘boost::asio::ip::tcp::endpoint’ {aka ‘boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>’}
> +    [-Werror=array-bounds=]
> +```
> +
> +
> +Original patch commit message:
> +```
> +The previous workaround for _FORTIFY_SOURCE warnings increased the size
> +of all IP endpoint objects. Instead, try fixing the warning at the point
> +where it occurs, by limiting the length memcpy-ed while processing the
> +addrinfo results from getaddrinfo.
> +```
> +
> +Upstream: Backport [https://github.com/boostorg/asio/commit/b2478a9ba9ed76d7c858419e3f677cc454591d45]

Just:

Upstream: https://github.com/boostorg/asio/commit/b2478a9ba9ed76d7c858419e3f677cc454591d45

is enough.

> +Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> +Signed-off-by: Christopher Kohlhoff <chris@kohlhoff.com>

Your SoB should be below the one of the author. But in this case, the
original patch does not have an SoB from the author (from what I could
see), so you cannot add it by yourself (it's like faking a signature
at the end of an important piece of paperwork!). However, you must add
your own SoB to indicate that the patch was conveyed through you.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2026-10-27 19:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 16:39 [Buildroot] [PATCH v2 01/14] package/boost: fix asio.hpp compile errors with gcc >= 15 Adam Duskett
2026-10-27 16:39 ` [Buildroot] [PATCH v2 02/14] package/mender-connect: bump to version 3.1.0 Adam Duskett
2026-10-27 19:45   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 03/14] package/mender-artifact: bump version to 4.4.2 Adam Duskett
2026-10-27 19:54   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 04/14] package/mender-grubenv: bump to version 32e10c0b Adam Duskett
2026-10-27 19:55   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 05/14] package/mender-update-modules: bump to version 3745bbea3 Adam Duskett
2026-10-27 19:56   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 06/14] package/mender-update-modules: add banner module Adam Duskett
2026-10-27 19:58   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 07/14] package/mender-update-modules: add persistent-app module Adam Duskett
2026-10-27 20:00   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 08/14] configs/mender_x86_64_efi_defconfig: bump kernel version to 6.18.59 Adam Duskett
2026-10-27 20:00   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 09/14] board/mender: change device type to compatible-types Adam Duskett
2026-10-27 20:03   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 10/14] board/mender/x86_64/post-image-efi.sh: do not prepend artifact name to mender image Adam Duskett
2026-10-27 20:15   ` Thomas Petazzoni via buildroot
2026-10-27 20:46   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 11/14] board/mender/x86_64: add a udev rule to create /dev/root Adam Duskett
2026-10-27 20:44   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 12/14] test_mender/post-build.sh: add rootfs image checksum for bootstrap artifact Adam Duskett
2026-10-27 20:45   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 13/14] test_mender/post-build.sh: use /etc/mender/device_type Adam Duskett
2026-10-27 20:47   ` Thomas Petazzoni via buildroot
2026-10-27 16:40 ` [Buildroot] [PATCH v2 14/14] package/mender: bump to version 5.2.0 Adam Duskett
2026-10-27 20:59   ` Thomas Petazzoni via buildroot
2026-10-27 19:07 ` Thomas Petazzoni via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=auD2H0OMhmukAv4h@windsurf \
    --to=buildroot@buildroot.org \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.