public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [Ada] Make the stack non-executable in GNAT tools
@ 2015-08-13 12:51 Florian Weimer
  2015-08-17 11:23 ` Arnaud Charlet
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2015-08-13 12:51 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

Due to PR67205, the deeply nested instantiations require trampolines,
which in turn requires an executable stack for the GNAT tools on
architectures such as x86_64.

Bootstrapped on x86_64-redhat-linux-gnu, and make check-ada
reports no unexpected failures.

Okay for trunk?

-- 
Florian Weimer / Red Hat Product Security

[-- Attachment #2: trampolines.patch --]
[-- Type: text/x-patch, Size: 2203 bytes --]

2015-08-13  Florian Weimer  <fweimer@redhat.com>

	* prj.adb (For_Every_Project_Imported_Context.Recursive_Check_Context):
	Move Name_Id_Set instantiation to the Prj package, to avoid trampolines.
	* prj-proc.adb (Process.Process_Expression_Variable_Decl):
	Move Name_Ids instantiation to the Prj.Proc package, to avoid
	trampolines.

diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb
index 57b88c6..3a014f1 100644
--- a/gcc/ada/prj-proc.adb
+++ b/gcc/ada/prj-proc.adb
@@ -72,6 +72,8 @@ package body Prj.Proc is
       Equal      => "=");
    --  Stores the default values of 'Runtime names for the various languages
 
+   package Name_Ids is new Ada.Containers.Vectors (Positive, Name_Id);
+
    procedure Add (To_Exp : in out Name_Id; Str : Name_Id);
    --  Concatenate two strings and returns another string if both
    --  arguments are not null string.
@@ -2193,8 +2195,6 @@ package body Prj.Proc is
          if Is_Attribute and then Name = Snames.Name_Project_Path then
             if In_Tree.Is_Root_Tree then
                declare
-                  package Name_Ids is
-                    new Ada.Containers.Vectors (Positive, Name_Id);
                   Val  : String_List_Id := New_Value.Values;
                   List : Name_Ids.Vector;
                begin
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 9da0f44..0deb39b 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -76,6 +76,9 @@ package body Prj is
                           All_Upper_Case => All_Upper_Case_Image'Access,
                           Mixed_Case     => Mixed_Case_Image'Access);
 
+   package Name_Id_Set is
+      new Ada.Containers.Ordered_Sets (Element_Type => Name_Id);
+
    procedure Free (Project : in out Project_Id);
    --  Free memory allocated for Project
 
@@ -589,9 +592,6 @@ package body Prj is
          In_Aggregate_Lib      : Boolean;
          From_Encapsulated_Lib : Boolean)
       is
-         package Name_Id_Set is
-           new Ada.Containers.Ordered_Sets (Element_Type => Name_Id);
-
          Seen_Name : Name_Id_Set.Set;
          --  This set is needed to ensure that we do not handle the same
          --  project twice in the context of aggregate libraries.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [Ada] Make the stack non-executable in GNAT tools
  2015-08-13 12:51 [PATCH] [Ada] Make the stack non-executable in GNAT tools Florian Weimer
@ 2015-08-17 11:23 ` Arnaud Charlet
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaud Charlet @ 2015-08-17 11:23 UTC (permalink / raw)
  To: Florian Weimer; +Cc: GCC Patches

> Due to PR67205, the deeply nested instantiations require trampolines,
> which in turn requires an executable stack for the GNAT tools on
> architectures such as x86_64.
> 
> Bootstrapped on x86_64-redhat-linux-gnu, and make check-ada
> reports no unexpected failures.
> 
> Okay for trunk?

Yes.

Arno

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-17 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13 12:51 [PATCH] [Ada] Make the stack non-executable in GNAT tools Florian Weimer
2015-08-17 11:23 ` Arnaud Charlet

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).