ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:50953] [Ruby master Bug#15178] Wrong paramaters passing to pthread_setname_np(3)
       [not found] <redmine.issue-15178.20180929154345.375@ruby-lang.org>
@ 2020-08-31 21:22 ` merch-redmine
  2020-12-31  6:37 ` [ruby-dev:50986] " nagachika00
  2021-04-04 23:30 ` [ruby-dev:51044] " usa
  2 siblings, 0 replies; 3+ messages in thread
From: merch-redmine @ 2020-08-31 21:22 UTC (permalink / raw)
  To: ruby-dev

Issue #15178 has been updated by jeremyevans0 (Jeremy Evans).


I agree with your analysis.  Looking at the NetBSD man page for pthread_setname_np (https://netbsd.gw.com/cgi-bin/man-cgi?pthread_setname_np++NetBSD-current), the format string is clearly the 2nd argument and not the third.  The only reason this hasn't caused problems is that few thread names are going to use printf(3) format specifiers.  I've added a pull request to fix this: https://github.com/ruby/ruby/pull/3492

----------------------------------------
Bug #15178: Wrong paramaters passing to pthread_setname_np(3)
https://bugs.ruby-lang.org/issues/15178#change-87328

* Author: taca (Takahiro Kambe)
* Status: Open
* Priority: Normal
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Ruby 2.6.0-preview2の動作を調べている途中で見つけました。

[Bug #9586]の修正r45713で、NetBSDの場合のpthread_setname_np(3)の引数を修正しています。
ここは第2引数と第3引数を入れ替えるのではなく、単に二重引用符を適切にquoteするだけとすべき
だったのではないでしょうか。

また、実際にthread_pthread.cで`SET_CURRENT_THREAD_NAME`を介してpthread_setname_np(3)が
呼び出される状況を理解していないのですが、指定する名前は`PTHREAD_MAX_NAMELEN_NP`を超える
ことはないと思って良いのでしょうか。(`PTHREAD_MAX_NAMELEN_NP`の値は32です。)

---Files--------------------------------
configure.ac.diff (645 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-dev:50986] [Ruby master Bug#15178] Wrong paramaters passing to pthread_setname_np(3)
       [not found] <redmine.issue-15178.20180929154345.375@ruby-lang.org>
  2020-08-31 21:22 ` [ruby-dev:50953] [Ruby master Bug#15178] Wrong paramaters passing to pthread_setname_np(3) merch-redmine
@ 2020-12-31  6:37 ` nagachika00
  2021-04-04 23:30 ` [ruby-dev:51044] " usa
  2 siblings, 0 replies; 3+ messages in thread
From: nagachika00 @ 2020-12-31  6:37 UTC (permalink / raw)
  To: ruby-dev

Issue #15178 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.5: UNKNOWN, 2.6: REQUIRED, 2.7: REQUIRED to 2.5: UNKNOWN, 2.6: REQUIRED, 2.7: DONE

ruby_2_7 16930b254b4e5397759d6b42845b495041b71321 merged revision(s) be9dbe1c3eb4bb4cab0bdc42a91ef425bb1eaddd.

----------------------------------------
Bug #15178: Wrong paramaters passing to pthread_setname_np(3)
https://bugs.ruby-lang.org/issues/15178#change-89659

* Author: taca (Takahiro Kambe)
* Status: Closed
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: REQUIRED, 2.7: DONE
----------------------------------------
Ruby 2.6.0-preview2の動作を調べている途中で見つけました。

[Bug #9586]の修正r45713で、NetBSDの場合のpthread_setname_np(3)の引数を修正しています。
ここは第2引数と第3引数を入れ替えるのではなく、単に二重引用符を適切にquoteするだけとすべき
だったのではないでしょうか。

また、実際にthread_pthread.cで`SET_CURRENT_THREAD_NAME`を介してpthread_setname_np(3)が
呼び出される状況を理解していないのですが、指定する名前は`PTHREAD_MAX_NAMELEN_NP`を超える
ことはないと思って良いのでしょうか。(`PTHREAD_MAX_NAMELEN_NP`の値は32です。)

---Files--------------------------------
configure.ac.diff (645 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-dev:51044] [Ruby master Bug#15178] Wrong paramaters passing to pthread_setname_np(3)
       [not found] <redmine.issue-15178.20180929154345.375@ruby-lang.org>
  2020-08-31 21:22 ` [ruby-dev:50953] [Ruby master Bug#15178] Wrong paramaters passing to pthread_setname_np(3) merch-redmine
  2020-12-31  6:37 ` [ruby-dev:50986] " nagachika00
@ 2021-04-04 23:30 ` usa
  2 siblings, 0 replies; 3+ messages in thread
From: usa @ 2021-04-04 23:30 UTC (permalink / raw)
  To: ruby-dev

Issue #15178 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.5: UNKNOWN, 2.6: REQUIRED, 2.7: DONE to 2.5: UNKNOWN, 2.6: DONE, 2.7: DONE

ruby_2_6 r67923 merged revision(s) be9dbe1c3eb4bb4cab0bdc42a91ef425bb1eaddd.

----------------------------------------
Bug #15178: Wrong paramaters passing to pthread_setname_np(3)
https://bugs.ruby-lang.org/issues/15178#change-91297

* Author: taca (Takahiro Kambe)
* Status: Closed
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: DONE, 2.7: DONE
----------------------------------------
Ruby 2.6.0-preview2の動作を調べている途中で見つけました。

[Bug #9586]の修正r45713で、NetBSDの場合のpthread_setname_np(3)の引数を修正しています。
ここは第2引数と第3引数を入れ替えるのではなく、単に二重引用符を適切にquoteするだけとすべき
だったのではないでしょうか。

また、実際にthread_pthread.cで`SET_CURRENT_THREAD_NAME`を介してpthread_setname_np(3)が
呼び出される状況を理解していないのですが、指定する名前は`PTHREAD_MAX_NAMELEN_NP`を超える
ことはないと思って良いのでしょうか。(`PTHREAD_MAX_NAMELEN_NP`の値は32です。)

---Files--------------------------------
configure.ac.diff (645 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-04 23:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15178.20180929154345.375@ruby-lang.org>
2020-08-31 21:22 ` [ruby-dev:50953] [Ruby master Bug#15178] Wrong paramaters passing to pthread_setname_np(3) merch-redmine
2020-12-31  6:37 ` [ruby-dev:50986] " nagachika00
2021-04-04 23:30 ` [ruby-dev:51044] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).