Skip to content

Commit 361f1e1

Browse files
committed
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.
1 parent 1a44317 commit 361f1e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/port/dynloader/darwin.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* available with a PostgreSQL-compatible license. Kudos Wilfredo
44
* Sánchez <wsanchez@apple.com>.
55
*
6-
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.5 2001/03/22 03:59:42 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.6 2002/10/01 05:06:44 tgl Exp $
77
*/
88

99
#include "postgres.h"
@@ -18,7 +18,9 @@ pg_dlopen(char *filename)
1818
if (NSCreateObjectFileImageFromFile(filename, &image) !=
1919
NSObjectFileImageSuccess)
2020
return NULL;
21-
return NSLinkModule(image, filename, TRUE);
21+
return NSLinkModule(image, filename,
22+
NSLINKMODULE_OPTION_BINDNOW |
23+
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
2224
}
2325

2426
void

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy