about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-09-10 12:48:55 +0000
committerbors <bors@rust-lang.org>2017-09-10 12:48:55 +0000
commitd290dec97f8bace2a2585505518b109b1e368f4c (patch)
treeb3973604ffde6b7dce3897b531a7faaf8c0aeb69 /src/libstd
parent23aaeb573b626a51af9ecc97680663153e4ab2b0 (diff)
parent8a7d93bf6f5b1a699bafec6f59964a3962b2e927 (diff)
downloadrust-d290dec97f8bace2a2585505518b109b1e368f4c.tar.gz
rust-d290dec97f8bace2a2585505518b109b1e368f4c.zip
Auto merge of #44474 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 13 pull requests

- Successful merges: #44262, #44329, #44332, #44347, #44372, #44384, #44387, #44396, #44449, #44451, #44457, #44464, #44467
- Failed merges:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/unix/backtrace/printing/dladdr.rs3
-rw-r--r--src/libstd/thread/local.rs4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/backtrace/printing/dladdr.rs b/src/libstd/sys/unix/backtrace/printing/dladdr.rs
index 3a3912af021..21f0b3724c1 100644
--- a/src/libstd/sys/unix/backtrace/printing/dladdr.rs
+++ b/src/libstd/sys/unix/backtrace/printing/dladdr.rs
@@ -22,7 +22,8 @@ pub fn resolve_symname<F>(frame: Frame,
 {
     unsafe {
         let mut info: Dl_info = intrinsics::init();
-        let symname = if dladdr(frame.exact_position, &mut info) == 0 {
+        let symname = if dladdr(frame.exact_position, &mut info) == 0 ||
+                         info.dli_sname.is_null() {
             None
         } else {
             CStr::from_ptr(info.dli_sname).to_str().ok()
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index 4ee8132f55c..a53c76a333a 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -31,6 +31,10 @@ use mem;
 /// within a thread, and values that implement [`Drop`] get destructed when a
 /// thread exits. Some caveats apply, which are explained below.
 ///
+/// A `LocalKey`'s initializer cannot recursively depend on itself, and using
+/// a `LocalKey` in this way will cause the initializer to infinitely recurse
+/// on the first call to `with`.
+///
 /// # Examples
 ///
 /// ```