diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2012-07-12 12:53:11 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2012-07-12 12:53:11 +0200 |
commit | aec6d6f6f82c7b566988c26013aa791cad353691 (patch) | |
tree | 54bee0be9d043707c2b8b77b1e9fc18949f52279 /open_issues/glibc/getlogin_r.mdwn | |
parent | 3552ec0c40ee2c12f0d8442f7522677588ae2845 (diff) | |
parent | bdb5476b45b43e1753514fe28d1be9436dd572bd (diff) |
Merge commit 'bdb5476b45b43e1753514fe28d1be9436dd572bd'
Diffstat (limited to 'open_issues/glibc/getlogin_r.mdwn')
-rw-r--r-- | open_issues/glibc/getlogin_r.mdwn | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/open_issues/glibc/getlogin_r.mdwn b/open_issues/glibc/getlogin_r.mdwn new file mode 100644 index 00000000..9980ea1f --- /dev/null +++ b/open_issues/glibc/getlogin_r.mdwn @@ -0,0 +1,45 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!meta title="getlogin_r"]] + +[[!tag open_issue_glibc]] + + +# IRC, freenode, #hurd, 2012-04-23 + + * pinotree spots how our getlogin_r() implementation uses a static + buffer... + <braunr> oO + <pinotree> braunr: yeah, the _r means "reentrantbutnotreally" xD + <braunr> pinotree: that's amazing .. + <antrik> pinotree: without having checked the actual implementation, that + doesn't sound like a problem... + <antrik> caching doesn't break reentrancy. the problem with the plain + getlogin() is that a static buffer is *returned to the user* + <pinotree> antrik: http://paste.debian.net/164727/ + <braunr> ah, caching + <pinotree> i don't think this is caching at all + <antrik> pinotree: OK, not actually caching... but same effect as far as I + can tell + <antrik> pinotree: or is it the fixed size of the temporary variable you + are concerned about? + <pinotree> antrik: my concern was about the "static" of the buffer used for + the get_login rpc + <antrik> pinotree: I'm not sure that's a problem. can the login actually + ever change for a running process? + <pinotree> dunno + <pinotree> but if so, it would be pointless to do the rpc every time + instead of just once + <antrik> pinotree: true + * pinotree would just make it non-static and be safe + <antrik> pinotree: well, one might argue that allocating a KiB of stack + space is not very friendly, especially in a low-level library... + <antrik> not sure what the general policy is about such things in libc |