[PATCH 4/6] src: Prevent invalid include of binary into compilation
Aaron Merey
amerey@redhat.com
Fri Oct 11 19:09:31 GMT 2024
Hi Michael,
On Thu, Oct 10, 2024 at 6:27 AM Michael Pratt <mcpratt@pm.me> wrote:
>
> The "stack" binary built by elfutils has the same name
> as the standard C++ header <stack>.
>
> If that header were to be in the list of includes
> while building the C++ elfutils program "srcfiles",
> then there is a chance that the "stack" binary
> is included instead and treated as text,
> leading to a decode error
> if "stack" happens to be built first
> and "." is in the include paths.
>
> Adding the result of C++ compilation srcfiles.o
> to the dependencies of "stack" ensures that
> the C++ compilation will happen first,
> before the stack binary is present.
>
> While this doesn't guarantee an error will not occur
> in all cases, it does guarantee that it will not occur
> from a clean build state.
I believe this issue was recently fixed in commit b426c4db31e7.
Aaron
More information about the Elfutils-devel
mailing list