sane-project-website/old-archive/2000-10/0229.html

151 wiersze
6.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: make dll.c robust against it being listed in it</TITLE>
<META NAME="Author" CONTENT="Oliver Rauch (oliver.rauch@Wolfsburg.DE)">
<META NAME="Subject" CONTENT="Re: make dll.c robust against it being listed in its configuration file...">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: make dll.c robust against it being listed in its configuration file...</H1>
<!-- received="Fri Oct 20 07:11:42 2000" -->
<!-- isoreceived="20001020141142" -->
<!-- sent="Fri, 20 Oct 2000 15:27:07 +0200" -->
<!-- isosent="20001020132707" -->
<!-- name="Oliver Rauch" -->
<!-- email="oliver.rauch@Wolfsburg.DE" -->
<!-- subject="Re: make dll.c robust against it being listed in its configuration file..." -->
<!-- id="39F0482B.5ECCC239@wolfsburg.de" -->
<!-- inreplyto="39EFF705.4B6ABA8E@gno.de" -->
<STRONG>From:</STRONG> Oliver Rauch (<A HREF="mailto:oliver.rauch@Wolfsburg.DE?Subject=Re:%20make%20dll.c%20robust%20against%20it%20being%20listed%20in%20its%20configuration%20%20file...&In-Reply-To=&lt;39F0482B.5ECCC239@wolfsburg.de&gt;"><EM>oliver.rauch@Wolfsburg.DE</EM></A>)<BR>
<STRONG>Date:</STRONG> Fri Oct 20 2000 - 06:27:07 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0230.html">Oliver Rauch: "Re: sane fronten packages"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0228.html">Steve Underwood: "Re: Problems with Acer ScanPrisa 640S"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0225.html">Jochen Eisinger: "Re: make dll.c robust against it being listed in its configuration file..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0234.html">Jochen Eisinger: "Re: make dll.c robust against it being listed in its configuration file..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0234.html">Jochen Eisinger: "Re: make dll.c robust against it being listed in its configuration file..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#229">[ date ]</A>
<A HREF="index.html#229">[ thread ]</A>
<A HREF="subject.html#229">[ subject ]</A>
<A HREF="author.html#229">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Jochen Eisinger wrote:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Hi!
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; [Petter Reinholdtsen]
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt; &gt; [Jochen Eisinger]
</EM><BR>
<EM>&gt; &gt; &gt; What about just checking the backend name against &quot;dll&quot; while
</EM><BR>
<EM>&gt; &gt; &gt; reading the dll.conf? This avoids that dll segfaults if dll is
</EM><BR>
<EM>&gt; &gt; &gt; listed in the dll.conf.
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt; &gt; Why do dll segfault? Shouldn't this be fixed first?
</EM><BR>
<EM>&gt; Because the dll - backend is loaded recursivly about 100.000 times...
</EM><BR>
<EM>&gt; actually dll doesn't segfault, but sooner or later one of the backends
</EM><BR>
<EM>&gt; segfaults when allocating new memory.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; &gt; I have not tested the patch, but it looks OK to me. I only suspect it
</EM><BR>
<EM>&gt; &gt; might be the wrong fix. :-)
</EM><BR>
<EM>&gt; Ok, might be... I've another fix: instead of linking libsane.* to
</EM><BR>
<EM>&gt; sane/libsane-dll.* we could copy libsane-dll.* to libsane.* and remove
</EM><BR>
<EM>&gt; the dll-backend from the lib/sane/ directory. This way, the dll-backend
</EM><BR>
<EM>&gt; can't load itself (because it isn't present as a backend)
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; what about this?
</EM><BR>
<EM>&gt;
</EM><BR>
Hi Jochen,
<BR>
<P>I think the right way is to look for &quot;dll&quot; in dll.conf and ignore it.
<BR>
<P>There is a good reason for the links form libsane.so to sane/libsane-dll.so:
<BR>
All sane libraries can be used directly. You can link from
<BR>
sane/libsane-mustek.so to libsane.so and the mustek backend is loaded directly.
<BR>
<P>If someone adds dll to dll.conf it is his fault, if I program a recursive loop
<BR>
that allocates memory I also get in trouble. So checking for dll in dll.conf
<BR>
is the correct way. dll should print a warning when it finds &quot;dll&quot; in dll.conf
<BR>
and ignore that.
<BR>
<P>Bye
<BR>
Oliver
<BR>
<P><PRE>
--
Homepage: <A HREF="http://www.wolfsburg.de/~rauch">http://www.wolfsburg.de/~rauch</A>
sane-umax: <A HREF="http://www.wolfsburg.de/~rauch/sane/sane-umax.html">http://www.wolfsburg.de/~rauch/sane/sane-umax.html</A>
xsane: <A HREF="http://www.wolfsburg.de/~rauch/sane/sane-xsane.html">http://www.wolfsburg.de/~rauch/sane/sane-xsane.html</A>
E-Mail: mailto:<A HREF="mailto:Oliver.Rauch@Wolfsburg.DE?Subject=Re:%20make%20dll.c%20robust%20against%20it%20being%20listed%20in%20its%20configuration%20%20file...&In-Reply-To=&lt;39F0482B.5ECCC239@wolfsburg.de&gt;">Oliver.Rauch@Wolfsburg.DE</A>
<P>--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20make%20dll.c%20robust%20against%20it%20being%20listed%20in%20its%20configuration%20%20file...&In-Reply-To=&lt;39F0482B.5ECCC239@wolfsburg.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0230.html">Oliver Rauch: "Re: sane fronten packages"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0228.html">Steve Underwood: "Re: Problems with Acer ScanPrisa 640S"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0225.html">Jochen Eisinger: "Re: make dll.c robust against it being listed in its configuration file..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0234.html">Jochen Eisinger: "Re: make dll.c robust against it being listed in its configuration file..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0234.html">Jochen Eisinger: "Re: make dll.c robust against it being listed in its configuration file..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#229">[ date ]</A>
<A HREF="index.html#229">[ thread ]</A>
<A HREF="subject.html#229">[ subject ]</A>
<A HREF="author.html#229">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Fri Oct 20 2000 - 07:15:28 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>