This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Give a better error for PCH with exec-shield-randomize


It seems like this is a fairly complex and fragile workaround for an
OS bug.  Is there some reason you can't just fix your kernel?  If not,
the autoconf test for HAVE_MINCORE should be extended to test for the
bug and ignore mincore() if it doesn't work.  Perhaps you could just
test for linux in general, since the whole mincore() stuff itself
was written to work around a Solaris "feature".

This code:

+      /* A Linux kernel with exec-shield-randomize set to a non-zero
+	 value won't work.  Give a nice error message for this common
+	 case.  */
+      {
+	FILE *pf;
+
+	pf = fopen ("/proc/sys/kernel/exec-shield-randomize", "r");
+	if (pf != NULL)

is Linux-specific code in the generic part of the compiler, and should
not be there.

       sorry ("had to relocate PCH");
+      abort ();

abort() is certainly wrong here, as Zack pointed out.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]