"Error mapping file into memory"?

Joshua Root jmr at macports.org
Fri Aug 17 01:17:54 UTC 2018


Poor phrasing on my part sorry: I should have said that mmap sets errno,
but macho_parse_file currently has no way of returning that extra
information to its caller. It should be possible to insert a perror call
or similar to get a more specific message (though it could end up being
EINVAL which can be returned for at least four different reasons - still
that at least narrows it down).

So a debug kernel may be a bit drastic at this stage, but worth keeping
in mind. :) Also kernel messages may not be a bad idea to look into even
if it's just by having Console open when the error occurs.

- Josh

On 2018-8-17 08:58 , Mike Crawford wrote:
> i could build a kernel with some logging.
> 
> i wont have time to help debug it until a week from Saturday but i could
> walk somebody through setting up the Firewire KPrintf Viewer.  Youll
> need a FW cable, and likely two FW Thunderbolt adapters.
> 
> Mike
> 
>     Well, "Error mapping file into memory" is the human-readable form of
>     MACHO_EMMAP, which is only returned in one place:
> 
>     <https://github.com/macports/macports-base/blob/master/src/machista1.0/libmachista.c#L477
>     <https://github.com/macports/macports-base/blob/master/src/machista1.0/libmachista.c#L477>>
> 
>     So all we know is that the underlying mmap call failed for some reason
>     (unfortunately mmap doesn't give a specific reason for its failures).
> 
>     - Josh


More information about the macports-users mailing list