This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Silent relocation truncations considered harmful
- From: Mark Geisert <mark at maxrnd dot com>
- To: cygwin-developers at cygwin dot com
- Date: Tue, 16 Feb 2016 11:53:12 -0800
- Subject: Re: Silent relocation truncations considered harmful
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot BSF dot 4 dot 63 dot 1602151808200 dot 49398 at m0 dot truegem dot net> <20160216162933 dot GB12439 at calimero dot vinschen dot de>
Sorry for the wrong patch format. That was intended for discussion only :).
I've appended a 'git diff' for the update.
..mark
diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
index f374d22..c250fdc 100644
--- a/winsup/cygwin/pseudo-reloc.cc
+++ b/winsup/cygwin/pseudo-reloc.cc
@@ -342,7 +342,7 @@ do_pseudo_reloc (void * start, void * end, void * base)
__write_memory ((void *) reloc_target, &reldata, 2);
break;
case 32:
-#if defined (__CYGWIN__) && defined (__x86_64__) && !defined (__OPTIMIZE__)
+#if defined (__CYGWIN__) && defined (__x86_64__)
if (reldata > (ptrdiff_t) __INT32_MAX__
|| reldata < -((ptrdiff_t) __INT32_MAX__) - 1)
__report_error ("Invalid relocation. Offset %p at address %p "