This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/17478] Fix off-by-one error in pthread_setname_np()


https://sourceware.org/bugzilla/show_bug.cgi?id=17478

--- Comment #3 from Richard Yao <ryao at gentoo dot org> ---
A minor correction. I used `snprintf()` to do the copy, not `strncpy()`. I just
got back from LinuxCon Europe and I am semi-jet lagged. I just pushed my
patches so that you can see them:

https://github.com/ryao/zfs/compare/pthread_setname_np-for-glibc-upstream
https://github.com/ryao/zfs/commit/0e67649ebc56f40f5eebca1f86e18f2e750dc002

It literally works with that patch and hits an assertion failure without it
(the VERIFY). The assertion failure is interesting because it seems that I was
lucky enough (unlucky enough?) for the code to be passing "arc_adapt_thread" as
the thread name.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]