[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: libtool--devo--1.0--patch-154
From: |
Gary V. Vaughan |
Subject: |
FYI: libtool--devo--1.0--patch-154 |
Date: |
Wed, 1 Sep 2004 18:32:59 +0100 (BST) |
User-agent: |
mailnotify/0.3 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD.
- --
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.5
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
iD8DBQFBNgfLFRMICSmD1gYRAlcNAKDMcHGsONtjSeD68iJY0QZRpnZfmwCghDuW
lLh1phCj9RGeVS7skNEyVeg=
=c4oM
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--devo--1.0--patch-153 to compare with
* comparing to address@hidden/libtool--devo--1.0--patch-153
M libltdl/lt_dlloader.c
M ChangeLog
M libltdl/ltdl.c
* modified files
Index: Changelog
from Gary V. Vaughan <address@hidden>
* libltdl/lt_dlloader.c (lt_dlloader_add): Handle malloc failure
from slist_new.
* libltdl/ltdl.c (loader_init): Trust lt_dlloader_add(), don't
overwrite its error type, and simplify.
Reported by Ralf Wildenhues <address@hidden>
--- orig/libltdl/lt_dlloader.c
+++ mod/libltdl/lt_dlloader.c
@@ -59,29 +59,37 @@
int
lt_dlloader_add (const lt_dlvtable *vtable)
{
- if ((vtable == 0) /* diagnose null parameters */
+ SList *list;
+
+ if ((vtable == 0) /* diagnose invalid vtable fields */
|| (vtable->module_open == 0)
|| (vtable->module_close == 0)
- || (vtable->find_sym == 0))
+ || (vtable->find_sym == 0)
+ || ((vtable->priority != LT_DLLOADER_PREPEND) &&
+ (vtable->priority != LT_DLLOADER_APPEND)))
{
LT__SETERROR (INVALID_LOADER);
return RETURN_FAILURE;
}
- switch (vtable->priority)
+ list = slist_new (vtable);
+ if (!list)
{
- case LT_DLLOADER_PREPEND:
- loaders = slist_cons (slist_new (vtable), loaders);
- break;
-
- case LT_DLLOADER_APPEND:
- loaders = slist_concat (loaders, slist_new (vtable));
- break;
+ (*lt__alloc_die) ();
- default:
- LT__SETERROR (INVALID_LOADER);
+ /* Let the caller know something went wrong if lt__alloc_die
+ doesn't abort. */
return RETURN_FAILURE;
- /*NOTREACHED*/
+ }
+
+ if (vtable->priority == LT_DLLOADER_PREPEND)
+ {
+ loaders = slist_cons (list, loaders);
+ }
+ else
+ {
+ assert (vtable->priority == LT_DLLOADER_APPEND);
+ loaders = slist_concat (loaders, list);
}
return RETURN_SUCCESS;
--- orig/libltdl/ltdl.c
+++ mod/libltdl/ltdl.c
@@ -167,20 +167,10 @@
vtable = (*vtable_func) (data);
}
- if (!vtable)
- {
- LT__SETERROR (INVALID_LOADER);
- ++errors;
- }
+ /* lt_dlloader_add will LT__SETERROR if it fails. */
+ errors += lt_dlloader_add (vtable);
- if (!errors)
- {
- if (lt_dlloader_add (vtable))
- {
- LT__SETERROR (DLOPEN_NOT_SUPPORTED);
- ++errors;
- }
- }
+ assert (errors || vtable);
if ((!errors) && vtable->dlloader_init)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: libtool--devo--1.0--patch-154,
Gary V. Vaughan <=