diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-03-26 09:07:22 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-03-26 13:42:04 +0530 |
| commit | d36cb2209f1b22b8b587ad128fb094156092aad8 (patch) | |
| tree | ebf943517d37e1ff58ced6ba3e0c6dde224e3a97 /src/libstd/sys/windows | |
| parent | e3e58247a3fbcd861c172a7311923116b1125ffd (diff) | |
| parent | 78495d5082f51a2737619824548c9f2407b12a2b (diff) | |
| download | rust-d36cb2209f1b22b8b587ad128fb094156092aad8.tar.gz rust-d36cb2209f1b22b8b587ad128fb094156092aad8.zip | |
Rollup merge of #32476 - diwic:63-null-thread-name, r=alexcrichton
Fix unsound behaviour with null characters in thread names (issue #32475) Previously, the thread name (&str) was converted to a CString in the new thread, but outside unwind::try, causing a panic to continue into FFI. This patch changes that behaviour, so that the panic instead happens in the parent thread (where panic infrastructure is properly set up), not the new thread. This could potentially be a breaking change for architectures who don't support thread names.
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/thread.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs index b18772c0c24..6908775e86f 100644 --- a/src/libstd/sys/windows/thread.rs +++ b/src/libstd/sys/windows/thread.rs @@ -54,7 +54,7 @@ impl Thread { } } - pub fn set_name(_name: &str) { + pub fn set_name(_name: &CStr) { // Windows threads are nameless // The names in MSVC debugger are obtained using a "magic" exception, // which requires a use of MS C++ extensions. |
