libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Report proper errors from the loadlibrary loader.


From: Ralf Wildenhues
Subject: Re: Report proper errors from the loadlibrary loader.
Date: Wed, 20 Jan 2010 22:15:13 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Peter,

* Peter Rosin wrote on Sun, Jan 17, 2010 at 09:19:27PM CET:
> Den 2010-01-17 17:45 skrev Bob Friesenhahn:
> >On Sun, 17 Jan 2010, Ralf Wildenhues wrote:
> >>
> >>I'm not too fond of adding new static storage and manipulation (yet
> >>another reason lt_dlopen may not be called concurrently from different
> >>threads), or improved functionality without testsuite exposure that we
> >>really improved.  Further, the documentation I found about GetLastError
> >>states W2K as minimum version, so I hope that you checked that this
> >>works with older Windows as well.  Otherwise, I am fine with the patch.
> >
> >It seems that GraphicsMagick has been using GetLastError() for a
> >very long time.  Certainly at least since Y2K.  There is no
> >special provision in this part of the code for anything older than
> >Windows XP and Windows 2000.  Then again, practically no one cares
> >about Windows versions older than this.
> 
> I think what has happened is that MS has abandoned WinNT and older and
> are thus ignoring them in MSDN. GetLastError certainly predates Win2k
> and I think it was in Win32 from from very beginning.

OK, that settles that then.

* Peter Rosin wrote on Mon, Jan 18, 2010 at 03:24:27PM CET:
> Going back to what this actually brings us...
> 
> Previously we had reported errors of "can't open the module" and "symbol not
> found". With the patch that turns into "The specified module could not be
> found.\r\n" and "The specified procedure could not be found." (WinXP) or
> "Module not found\r\n" and "Procedure not found\r\n" (Wine).
> 
> The \r\n at the end of the messages should probably be removed.

Sounds like a good idea to me.

> And I did
> manage to write a test that exposes this new functionallity - as you
> requested - by unloading all modules except the loadlibrary loader (and
> the preopen loader). The test is attached.

Good.  Thanks.  I can't find obvious issues with the test, and it should
skip on all unixy systems (due to loadlibrary loader not being present).

> But, I have not succeeded in generating any other errors than the above
> two. I have tried to remove execute bits on the plugin and a dependent
> library, and I have tried removing a dependent library. But real problems
> usually manifests themselves in weird ways and the correct error message
> may be crucial in some unforseen case. Is it worth it?

We can cross that bridge when we get to it, i.e., when we have a problem
report with a setup that provoke such an error.  The test case is good
because it ensures several code paths are covered in the source.  If it
works on MiNGW (I gather from above that you've already tested Cygwin
and Wine) then feel free to commit both patch and test.

Thanks!
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]