Silent relocation truncations considered harmful

Corinna Vinschen
Wed Feb 17 09:59:00 GMT 2016

Hi Mark,

On Feb 16 11:53, Mark Geisert wrote:
> 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/ b/winsup/cygwin/
> index f374d22..c250fdc 100644
> --- a/winsup/cygwin/
> +++ b/winsup/cygwin/
> @@ -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 "

Thanks, but this patch still doesn't apply.  The problem is that the
white spaces are wrong.  Did your mailer convert TABs to spaces or is
that a copy/paste problem?

To avoid that problem, I suggest to commit your patch to a local
branch, create a patch file using `git format-patch' and attach it
to your mail.  That should work all the time (and allows the lazy
maintainer to apply the patch with a simple `git am' call ;))

Never mind that for this patch.  I applied it manually.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin-developers mailing list