Skip to content

Commit d22c48b

Browse files
authored
Update crates/vm/src/stdlib/thread.rs
1 parent 890b018 commit d22c48b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/vm/src/stdlib/thread.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ pub(crate) mod _thread {
306306
use std::ffi::CString;
307307
if let Ok(c_name) = CString::new(name.as_str()) {
308308
// pthread_setname_np on Linux has a 16-byte limit including null terminator
309+
// TODO: Potential UTF-8 boundary issue when truncating thread name on Linux.
310+
// https://github.com/RustPython/RustPython/pull/6726/changes#r2689379171
309311
let truncated = if c_name.as_bytes().len() > 15 {
310312
CString::new(&c_name.as_bytes()[..15]).unwrap_or(c_name)
311313
} else {

0 commit comments

Comments
 (0)