Pass less-unsafe parameters to Darwin's NSLinkModule. While this change prevents a backend coredump when loading a broken shlib, it also seems to suppress the error messages that might help debug the problem :-(. Perhaps someone would like to supply a 'linkEdit' hook to get the best of both worlds. But in the meantime, backend crash trumps error reporting.
This commit is contained in:
parent
1a4431777b
commit
361f1e1656
@ -3,7 +3,7 @@
|
|||||||
* available with a PostgreSQL-compatible license. Kudos Wilfredo
|
* available with a PostgreSQL-compatible license. Kudos Wilfredo
|
||||||
* Sánchez <wsanchez@apple.com>.
|
* Sánchez <wsanchez@apple.com>.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.5 2001/03/22 03:59:42 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.6 2002/10/01 05:06:44 tgl Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
@ -18,7 +18,9 @@ pg_dlopen(char *filename)
|
|||||||
if (NSCreateObjectFileImageFromFile(filename, &image) !=
|
if (NSCreateObjectFileImageFromFile(filename, &image) !=
|
||||||
NSObjectFileImageSuccess)
|
NSObjectFileImageSuccess)
|
||||||
return NULL;
|
return NULL;
|
||||||
return NSLinkModule(image, filename, TRUE);
|
return NSLinkModule(image, filename,
|
||||||
|
NSLINKMODULE_OPTION_BINDNOW |
|
||||||
|
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user