Module Name:    src
Committed By:   christos
Date:           Sat Apr 13 03:15:25 UTC 2019

Modified Files:
        src/libexec/ld.elf_so: rtld.c

Log Message:
Fix c++ exceptions on arm; jemalloc calls _rtld_tls_get_addr from inside
dl_iterate_phdr, so we need to unlock and relock.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/libexec/ld.elf_so/rtld.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.195 src/libexec/ld.elf_so/rtld.c:1.196
--- src/libexec/ld.elf_so/rtld.c:1.195	Sat Dec 29 20:48:37 2018
+++ src/libexec/ld.elf_so/rtld.c	Fri Apr 12 23:15:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.c,v 1.195 2018/12/30 01:48:37 christos Exp $	 */
+/*	$NetBSD: rtld.c,v 1.196 2019/04/13 03:15:25 christos Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.195 2018/12/30 01:48:37 christos Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.196 2019/04/13 03:15:25 christos Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -1462,7 +1462,9 @@ dl_iterate_phdr(int (*callback)(struct d
 		phdr_info.dlpi_subs = _rtld_objloads - _rtld_objcount;
 
 		/* XXXlocking: exit point */
+		_rtld_shared_exit();
 		error = callback(&phdr_info, sizeof(phdr_info), param);
+		_rtld_shared_enter();
 		if (error)
 			break;
 	}

Reply via email to