From: Peter Korsgaard <peter@korsgaard.com>
To: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/haproxy: fix runtime 'FATAL ERROR: invalid code detected -- cannot go further'
Date: Sat, 13 Jan 2024 22:13:13 +0100 [thread overview]
Message-ID: <87le8tndhy.fsf@48ers.dk> (raw)
In-Reply-To: <20240101213454.558295-1-aleksandr.o.makarov@gmail.com> (Aleksandr Makarov's message of "Mon, 1 Jan 2024 23:34:54 +0200")
>>>>> "Aleksandr" == Aleksandr Makarov <aleksandr.o.makarov@gmail.com> writes:
> Forcing HAPROXY_CFLAGS on the haproxy build command line overrides CFLAGS
> which were internally set by the package Makefile.
> In such a way, a bunch of flags that were deduced by the package build script
> in *_CFLAGS variables, specifically in SPEC_CFLAGS, are omitted. Compiling and
> running haproxy without SPEC_CFLAGS taken into account results in runtime error:
> $ haproxy
> FATAL ERROR: invalid code detected -- cannot go further, please recompile!
> The source code was miscompiled by the compiler, which usually indicates that
> some of the CFLAGS needed to work around overzealous compiler optimizations
> were overwritten at build time. Please do not force CFLAGS, and read Makefile
> and INSTALL files to decide on the best way to pass your local build options.
> ...
> This error is produced by haproxy.c [1] source which effectively ensures that INT_MAX+1
> expression wraps around using twos-complement representation. It is only true when -fwrapv
> gcc option is set in SPEC_CFLAGS.
> To address this, append necessary *_CFLAGS variables to the CFLAGS in haproxy Makefile.
> [1] https://git.haproxy.org/?p=haproxy.git;a=blob;f=src/haproxy.c;h=e1863255422459e806f7e50828e81976bb41c14c;hb=HEAD#l3304
> Signed-off-by: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
> ---
> ...fix-runtime-FATAL-ERROR-invalid-code.patch | 50 +++++++++++++++++++
> 1 file changed, 50 insertions(+)
> create mode 100644 package/haproxy/0002-package-haproxy-fix-runtime-FATAL-ERROR-invalid-code.patch
> diff --git a/package/haproxy/0002-package-haproxy-fix-runtime-FATAL-ERROR-invalid-code.patch b/package/haproxy/0002-package-haproxy-fix-runtime-FATAL-ERROR-invalid-code.patch
> new file mode 100644
> index 0000000000..39706048f3
> --- /dev/null
> +++ b/package/haproxy/0002-package-haproxy-fix-runtime-FATAL-ERROR-invalid-code.patch
> @@ -0,0 +1,50 @@
> +From 9dbf27180c5ae04b11076c46da029bfd1446782a Mon Sep 17 00:00:00 2001
> +From: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
> +Date: Mon, 1 Jan 2024 22:04:15 +0200
> +Subject: [PATCH 1/1] package/haproxy: fix runtime 'FATAL ERROR: invalid code
> + detected -- cannot go further'
Has this patch been submitted upstream? If so, what is the status of it?
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-01-13 21:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-01 21:34 [Buildroot] [PATCH 1/1] package/haproxy: fix runtime 'FATAL ERROR: invalid code detected -- cannot go further' Aleksandr Makarov
2024-01-13 21:13 ` Peter Korsgaard [this message]
2024-01-17 18:02 ` Александр Макаров
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=87le8tndhy.fsf@48ers.dk \
--to=peter@korsgaard.com \
--cc=aleksandr.o.makarov@gmail.com \
--cc=buildroot@buildroot.org \
/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.