mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
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
|
||||
* 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"
|
||||
@ -18,7 +18,9 @@ pg_dlopen(char *filename)
|
||||
if (NSCreateObjectFileImageFromFile(filename, &image) !=
|
||||
NSObjectFileImageSuccess)
|
||||
return NULL;
|
||||
return NSLinkModule(image, filename, TRUE);
|
||||
return NSLinkModule(image, filename,
|
||||
NSLINKMODULE_OPTION_BINDNOW |
|
||||
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user