]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2004/003036.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2004 / 003036.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] Re: Segmentation Error at startup with
5 database load
6 </TITLE>
7 <LINK REL="Index" HREF="index.html" >
8 <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20Re%3A%20Segmentation%20Error%20at%20startup%20with%0A%09database%20load&In-Reply-To=6.1.0.6.0.20040614171338.02774f18%40mail">
9 <META NAME="robots" CONTENT="index,nofollow">
10 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
11 <LINK REL="Previous" HREF="003035.html">
12 <LINK REL="Next" HREF="003037.html">
13 </HEAD>
14 <BODY BGCOLOR="#ffffff">
15 <H1>[IRCServices Coding] Re: Segmentation Error at startup with
16 database load</H1>
17 <B>Andrew Church</B>
18 <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20Re%3A%20Segmentation%20Error%20at%20startup%20with%0A%09database%20load&In-Reply-To=6.1.0.6.0.20040614171338.02774f18%40mail"
19 TITLE="[IRCServices Coding] Re: Segmentation Error at startup with
20 database load">achurch at achurch.org
21 </A><BR>
22 <I>Thu Jun 17 13:55:50 PDT 2004</I>
23 <P><UL>
24 <LI>Previous message: <A HREF="003035.html">[IRCServices Coding] Msg at Box logs
25 </A></li>
26 <LI>Next message: <A HREF="003037.html">[IRCServices Coding] Simple Services Server Module
27 </A></li>
28 <LI> <B>Messages sorted by:</B>
29 <a href="date.html#3036">[ date ]</a>
30 <a href="thread.html#3036">[ thread ]</a>
31 <a href="subject.html#3036">[ subject ]</a>
32 <a href="author.html#3036">[ author ]</a>
33 </LI>
34 </UL>
35 <HR>
36 <!--beginarticle-->
37 <PRE> Moving this to the coding list (and CC'ing you in case you're not
38 subscribed--apologies if you get this twice).
39
40 &gt;<i>As it has been about 15 or 16 years since I have done any serious assembly
41 </I>&gt;<i>programming, and GNU is very new to me, I am a bit curious about why this
42 </I>&gt;<i>particular solution is chosen.
43 </I>
44 My main reason for choosing to use trampolines is simplicity: assuming
45 the compiler works correctly (which turned out to be an incorrect
46 assumption, but disregarding that), it's simpler to have a trampoline stub
47 that looks up a function and then calls that function with whatever
48 parameters it received, than to write a separate stub for each imported
49 function and specify the parameters for each explicitly.
50
51 The reason external symbols have to be looked up in the first place is
52 a chicken-and-egg problem with respect to the various modules that use the
53 database module. For example, the main NickServ module (nickserv/main)
54 calls open_nick_db() in the database module, which in turn calls (among
55 others) check_expire_nick() in nickserv/main. Since both modules can't be
56 loaded simultaneously, one of them has to obtain symbol addresses manually.
57
58 Explicitly passing the addresses of required routines from the caller
59 to the database module is certainly an option, but goes against my
60 aesthetic sense. (: Admittedly, kludging around a broken compiler is just
61 as bad, but...
62
63 At any rate, it's my intent to redesign the database system for 5.1,
64 primarily to open the way to using real databases (MySQL, etc.), but also
65 to clean up leftovers from the old monolithic structure which I essentially
66 left alone in the 5.0 redesign.
67
68 In the meantime, I'll read through your debugging output and see if I
69 can come up with a PowerPC kludge. Could you also try compiling with GCC
70 3.4.0 and see if that fixes the problem?
71
72 --Andrew Church
73 <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>
74 <A HREF="http://achurch.org/">http://achurch.org/</A>
75
76
77 </PRE>
78
79 <!--endarticle-->
80 <HR>
81 <P><UL>
82 <!--threads-->
83 <LI>Previous message: <A HREF="003035.html">[IRCServices Coding] Msg at Box logs
84 </A></li>
85 <LI>Next message: <A HREF="003037.html">[IRCServices Coding] Simple Services Server Module
86 </A></li>
87 <LI> <B>Messages sorted by:</B>
88 <a href="date.html#3036">[ date ]</a>
89 <a href="thread.html#3036">[ thread ]</a>
90 <a href="subject.html#3036">[ subject ]</a>
91 <a href="author.html#3036">[ author ]</a>
92 </LI>
93 </UL>
94
95 </body></html>