[Bug general/32263] RFE: API to create/track executable memory layout for processes from perf PERF_RECORD_MMAP* events

2024-10-11 Thread mail at milianw dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32263

Milian Wolff  changed:

   What|Removed |Added

 CC||mail at milianw dot de

--- Comment #1 from Milian Wolff  ---
this is already possible, we do that in e.g. `perfparser`, cf.
https://github.com/KDAB/perfparser/blob/hotspot/app/perfsymboltable.cpp#L336

the problem is the interpretation of the MMAP events into a form that elfutils
can understand, it seems to be incapable of just ingesting the MMAP events
as-is, you have to do some interpretation to prevent overlapping regions etc. -
see https://github.com/KDAB/perfparser/blob/hotspot/app/perfelfmap.cpp#L69

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH 4/6] src: Prevent invalid include of binary into compilation

2024-10-11 Thread Aaron Merey
Hi Michael,

On Thu, Oct 10, 2024 at 6:27 AM Michael Pratt  wrote:
>
> The "stack" binary built by elfutils has the same name
> as the standard C++ header .
>
> 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



Re: [PATCH 4/6] src: Prevent invalid include of binary into compilation

2024-10-11 Thread Michael Pratt


Hi, thanks for the reply,

On Friday, October 11th, 2024 at 15:09, Aaron Merey  wrote:

> 
> I believe this issue was recently fixed in commit b426c4db31e7.


Yeah, this looks like it handles the problem more directly,
thanks for pointing it out.

However, it would be nice if DEFAULT_INCLUDES was AC_SUBST'd
instead of just blank for this case.

Do you need me to resend the series without this patch?

--
MCP