CFA: pseudo-reloc v2

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Mon Oct 5 20:33:00 GMT 2009


On Mon, Oct 05, 2009 at 03:04:53PM -0400, Charles Wilson wrote:
>So here's another approach. It relies on the
>cygwin_terminate_process/cygwin_exit_process wrapper functions, posted
>here: http://cygwin.com/ml/cygwin-patches/2009-q4/msg00028.html
>
>Attached are two patches. The first contains modifications to the cygwin
>DLL.
>
>2009-10-04  Charles Wilson  <...>
>
>	* ntdll.h: Add custom NTSTATUS value for pseudo-reloc
>	errors STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION.
>	* pinfo.cc (status_exit): Map custom pseudo-reloc
>	error value STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION to 127.
>	* sigproc.cc (child_info::proc_retry): Return exit code when
>        STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION.
>
>The second shows the differences between winsup/mingw/pseudo-reloc.c and
>winsup/cygwin/lib/pseudo-reloc.c -- that is, it assumes you've already
>copied the mingw version over.  When I post this to cygwin-patches, I'll
>make a traditional diff against CVS HEAD.
>
>This one differs from previous iterations:
> 1) it uses WriteFile instead of WriteConsoleW.
> 2) it gets the module name and path itself, and prints error
>    messages in a form similar to that used already in
>    pinfo::status_exit() for STATUS_DLL_NOT_FOUND.
> 3) Nor more need for write_console code copied from cygwin proper,
>    which is good because that was questionable, license-wise.
>
>Anyway, when combined with the 'TerminateProcess' wrapper patch, this
>version works in every test I've thrown at it.

This looks good to me although I think it could stand a few more
comments.  I feel like a hypocrite every time I ask for that but do as I
say not as I do, dammit!

I think the only question is whether this belongs in 1.7.1 or 1.7.2.
I'll leave that one to Corinna but my vote is for 1.7.1.

But, anyway, thanks very much for seeing this through Chuck.  Much
appreciated.

At some point it would probably be nice for cygwin to be multi-language
aware wouldn't it?  Then we could issue warnings/errors in the right
language.

cgf



More information about the Cygwin-developers mailing list