public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Patrick Wollgast <patrick.wollgast@rub.de>
To: Kai Tietz <ktietz70@googlemail.com>,
	 "cmtice@google.com >> Caroline Tice" <cmtice@google.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Ping] Port of VTV for Cygwin and MinGW
Date: Mon, 02 Feb 2015 19:56:00 -0000	[thread overview]
Message-ID: <54CFD673.2070207@rub.de> (raw)
In-Reply-To: <54C8C89C.1000104@rub.de>

Hi,

after the missed bug at Linux with no VTV I checked everything again on
the trunk. I saw that I erroneously wrote in the changelog for
libvtv/aclocal.m4 regenerate and deleted the change from the patch. The
only change I made there in my working directory was the following.

Index: libvtv/aclocal.m4
===================================================================
--- libvtv/aclocal.m4	(Revision 220306)
+++ libvtv/aclocal.m4	(Arbeitskopie)
@@ -1006,6 +1006,7 @@ AC_SUBST([am__untar])
 m4_include([../config/acx.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/libstdc++-raw-cxx.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])

And then autoconf/automake again.


Something I missed during my last test, since Cygwin with gcc 4.9 and
the patch bootstrapped fine, is the following. One of the last changes
to the patch was to remove the implementation of mprotect in libvtv/
(copied from the MinGW port from libgcc2.c), because libgcc2.c
implements it for MinGW, and cygwin1.dll implements it for Cygwin.
However, PAGE_SIZE/PAGESIZE returns 0x10000 on Cygwin on a 64bit PC/VM
(don't have a 32bit PC/VM but I assume that the value would be 0x1000
there). On Linux 64bit it returns 0x1000 and on Windows 64bit with
SYSTEM_INFO/dwPageSize also returns 0x1000. This causes mprotect of
Cygwin to fail for libvtv, since the passed address is checked for
alignment with PAGE_SIZE/PAGESIZE.

The solutions I come up with are:
    - Set VTV_PAGE_SIZE to 0x10000 on Cygwin with 64bit PCs/VMs. But
      this would set more than the desired section to be read/write.
      Practically the whole dll would be writable for the
      .vtable_map_vars section to be writable. Therefore I don't
      recommend this solution. The changes would be in
      include/vtv-change-permission.h, and various other files where
      sizes have to be changed.
    - Add the mprotect implementation from libgcc2.c again for Cygwin
      in libvtv/. In libgcc2.c it isn't build for Cygwin. The changes
      would just be in libvtv/. I'd prefer this solution.


Patrick

      parent reply	other threads:[~2015-02-02 19:56 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 11:04 Patrick Wollgast
2014-09-11  4:12 ` [Ping] " Patrick Wollgast
     [not found]   ` <CABtf2+RU7frwOXOX2FF8Tmfc6ssrpfFVj1Vuue4cZt19FpSWtQ@mail.gmail.com>
2014-09-12 22:44     ` Caroline Tice
2014-09-18 22:24       ` Patrick Wollgast
2014-09-23  6:16         ` Caroline Tice
2014-09-23 10:22         ` Jonathan Wakely
2014-09-24 22:25           ` Patrick Wollgast
2014-09-27 10:50             ` Kai Tietz
2014-10-09 13:56               ` Patrick Wollgast
2014-10-09 14:47                 ` Kai Tietz
2014-10-16 10:23                   ` Patrick Wollgast
2014-10-30 14:51                     ` Patrick Wollgast
2014-11-12 16:23                       ` Patrick Wollgast
2014-11-12 17:05                         ` Kai Tietz
2014-11-12 17:47                           ` Patrick Wollgast
2014-11-12 18:45                             ` Kai Tietz
2014-11-27  9:59                               ` Patrick Wollgast
2014-12-10 16:37                                 ` Patrick Wollgast
2015-01-04 20:10                                   ` Patrick Wollgast
2015-01-08 20:34                                     ` Patrick Wollgast
2015-01-12 18:32                                       ` Caroline Tice
2015-01-14 19:28                                       ` Ian Lance Taylor
2015-01-14 21:23                                         ` Patrick Wollgast
2015-01-14 23:56                                           ` Ian Lance Taylor
2015-01-15  8:34                                             ` Patrick Wollgast
2015-01-15 16:14                                               ` Ian Lance Taylor
2015-01-15 22:13                                                 ` Patrick Wollgast
2015-01-28 14:04                                                   ` Patrick Wollgast
2015-01-29  1:58                                                     ` Caroline Tice
2015-01-29 18:16                                                       ` H.J. Lu
2015-01-29 18:22                                                         ` H.J. Lu
2015-01-29 18:23                                                         ` Caroline Tice
2015-01-29 18:16                                                       ` Matthias Klose
2015-01-29 18:26                                                         ` Matthias Klose
2015-01-29 18:28                                                           ` Jonathan Wakely
2015-01-29 18:34                                                             ` H.J. Lu
2015-01-29 18:59                                                               ` H.J. Lu
2015-01-29 19:27                                                                 ` H.J. Lu
2015-01-29 18:30                                                           ` H.J. Lu
2015-01-29 18:53                                                             ` Matthias Klose
2015-01-29 19:39                                                               ` Jakub Jelinek
2015-01-29 19:55                                                                 ` H.J. Lu
2015-01-29 20:01                                                                   ` Jakub Jelinek
2015-01-29 20:08                                                                     ` H.J. Lu
2015-01-29 19:28                                                             ` Jakub Jelinek
2015-02-09 12:32                                                       ` Thomas Schwinge
2015-02-02 19:56                                                     ` Patrick Wollgast [this message]

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=54CFD673.2070207@rub.de \
    --to=patrick.wollgast@rub.de \
    --cc=cmtice@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ktietz70@googlemail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).