|
From: Julian S. <js...@ac...> - 2005-11-02 18:26:28
|
Tom, can you outline the background to this? Presumably you found a
case where the interpreter-loading failed?
What's happened is, this change causes the interpreter to get loaded at
zero at least for SuSE10(x86) and whatever-Nick's-running(x86), because
the interpreter specifies a load address of zero for its text segment:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x144f8 0x144f8 R E 0x1000
LOAD 0x014cc0 0x00015cc0 0x00015cc0 0x0079c 0x00854 RW 0x1000
and having any mapping at zero causes some of the regtests to fail
(badjump2 for one) and doesn't seem a good idea in general.
J
On Tuesday 01 November 2005 19:46, sv...@va... wrote:
> Author: tom
> Date: 2005-11-01 19:46:07 +0000 (Tue, 01 Nov 2005)
> New Revision: 4980
>
> Log:
> Make the request for space for the interpreter into a hint so that we
> can still proceed if the preferred load address is not available.
>
> Modified:
> trunk/coregrind/m_ume.c
>
>
> Modified: trunk/coregrind/m_ume.c
> ===================================================================
> --- trunk/coregrind/m_ume.c 2005-11-01 17:52:34 UTC (rev 4979)
> +++ trunk/coregrind/m_ume.c 2005-11-01 19:46:07 UTC (rev 4980)
> @@ -438,6 +438,7 @@
>
> if (interp != NULL) {
> /* reserve a chunk of address space for interpreter */
> + MapRequest mreq;
> Addr advised;
> Bool ok;
>
> @@ -447,9 +448,10 @@
> the specified address. This is a bit of hack, but it should
> work because there should be no intervening transactions with
> aspacem which could cause those fixed maps to fail. */
> - advised = VG_(am_get_advisory_client_simple)(
> - (Addr)interp_addr, interp_size, &ok
> - );
> + mreq.rkind = MHint;
> + mreq.start = interp_addr;
> + mreq.len = interp_size;
> + advised = VG_(am_get_advisory)( &mreq, True/*client*/, &ok );
> if (!ok) {
> /* bomb out */
> SysRes res = VG_(mk_SysRes_Error)(VKI_EINVAL);
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|