[LU-8854] liblustre should not define strlcpy or strlcat Created: 18/Nov/16 Updated: 27/Feb/18 Resolved: 27/Feb/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.11.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Patrick Farrell (Inactive) | Assignee: | Patrick Farrell (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
Currently, liblustre defines strlcpy and strlcat. This is problematic because some other libraries (which also shouldn't...) do this too, and then we can't link against them. (Notably, linking against SLURM libraries gets you libmunge, which defines them. So you can't link against liblustre and slurm.) nm output for a recent-ish version of liblustre (the problem is the symbols marked "T", which are defined): The solution is a fairly simple trick with #define, which lets us keep using the normal names without defining the symbols: Here's the resulting nm output: Patch coming shortly. |
| Comments |
| Comment by Gerrit Updater [ 18/Nov/16 ] |
|
Patrick Farrell (paf@cray.com) uploaded a new patch: http://review.whamcloud.com/23869 |
| Comment by James A Simmons [ 10/Aug/17 ] |
|
Thank you for doing this. I have so been wanting to do this. |
| Comment by James A Simmons [ 23/Aug/17 ] |
|
Thinking about this do we really need strlcpy and strlcat. snprintf(dst, len, "%s", src) = strlcpy() and snprintf(dst, len, "%s%s", src1, src2) = strlcat(). I think we could easily replace the occurrence with snprintf(..). |
| Comment by Gerrit Updater [ 26/Oct/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/29798 |
| Comment by Gerrit Updater [ 27/Feb/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/29798/ |
| Comment by Peter Jones [ 27/Feb/18 ] |
|
Landed for 2.11 |