gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Gnucap-devel] plugin plans


From: al davis
Subject: Re: [Gnucap-devel] plugin plans
Date: Thu, 19 Feb 2015 15:09:09 -0500
User-agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; )

On Tuesday 10 February 2015, Felix Salfelder wrote:
> On Tue, Feb 10, 2015 at 01:59:46AM -0500, al davis wrote:
> > One is to scan the file before calling dlopen.  I think I
> > can do it with two lines of code.
> 
> do you know which file dlopen("plugin.so") will load? i dont.
> but there might be a way...

Perhaps we should explicitly make our own path.

> > Another idea is for the main lib to have a symbol named to
> > identify the version, and the plugin references it.  If
> > there is a mismatch, there will be an unresolved symbol on
> > loading, which is a fault condition that dlopen can
> > handle.
> > 
> > I am leaning toward the first, because it is so simple.
> 
> this one 

-------which one?

> will not allow to load forcefully. otherwise i
> really like it, it should be added as a safety net between
> major versions/revisions.

Actually, the second does allow to load forcefully with the 
"lazy" option already there.  Perhaps it should be called 
"force" instead.

To decide whether forced load makes sense we need to ask why a 
mismatch matters.

The answer is that the headers might not match, making some 
addresses resolve to being different in plugin vs. core.  It 
this case, it is likely to cause a crash so forcing it would not 
be a good idea.



reply via email to

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