This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/17478] Fix off-by-one error in pthread_setname_np()
- From: "ryao at gentoo dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 16 Oct 2014 05:24:24 +0000
- Subject: [Bug nptl/17478] Fix off-by-one error in pthread_setname_np()
- Auto-submitted: auto-generated
- References: <bug-17478-131 at http dot sourceware dot org/bugzilla/>
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.