<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:21:07 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-8854] liblustre should not define strlcpy or strlcat</title>
                <link>https://jira.whamcloud.com/browse/LU-8854</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Currently, liblustre defines strlcpy and strlcat.  This is problematic because some other libraries (which also shouldn&apos;t...) do this too, and then we can&apos;t link against them.  (Notably, linking against SLURM libraries gets you libmunge, which defines them.  So you can&apos;t link against liblustre and slurm.)&lt;/p&gt;

&lt;p&gt;nm output for a recent-ish version of liblustre (the problem is the symbols marked &quot;T&quot;, which are defined):&lt;br/&gt;
nm /lib64/liblustreapi.a | grep strl&lt;br/&gt;
                  U strlcat&lt;br/&gt;
                  U strlcpy&lt;br/&gt;
                  U strlen&lt;br/&gt;
                  U strlcpy&lt;br/&gt;
                  U strlen&lt;br/&gt;
                  U strlen&lt;br/&gt;
0000000000000060 T strlcat&lt;br/&gt;
0000000000000000 T strlcpy&lt;br/&gt;
                  U strlen&lt;/p&gt;

&lt;p&gt;The solution is a fairly simple trick with #define, which lets us keep using the normal names without defining the symbols:&lt;br/&gt;
-size_t strlcpy(char *tgt, const char *src, size_t tgt_len);&lt;br/&gt;
+size_t ll_strlcpy(char *tgt, const char *src, size_t tgt_len);&lt;br/&gt;
+/* We must not export the strlcpy symbol from liblustre, hence this weirdness *&lt;br/&gt;
+#define strlcpy(a, b, c) ll_strlcpy(a, b, c)&lt;/p&gt;

&lt;p&gt;Here&apos;s the resulting nm output:&lt;br/&gt;
nm ./lustre/utils/liblustreapi.a | grep strl&lt;br/&gt;
                 U ll_strlcat&lt;br/&gt;
                 U ll_strlcpy&lt;br/&gt;
                 U strlen&lt;br/&gt;
                 U ll_strlcpy&lt;br/&gt;
                 U strlen&lt;br/&gt;
                 U strlen&lt;br/&gt;
0000000000000000 T ll_strlcat&lt;br/&gt;
0000000000000090 T ll_strlcpy&lt;br/&gt;
                 U strlen&lt;/p&gt;

&lt;p&gt;Patch coming shortly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="41685">LU-8854</key>
            <summary>liblustre should not define strlcpy or strlcat</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="paf">Patrick Farrell</assignee>
                                    <reporter username="paf">Patrick Farrell</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Nov 2016 22:20:48 +0000</created>
                <updated>Tue, 27 Feb 2018 04:34:54 +0000</updated>
                            <resolved>Tue, 27 Feb 2018 04:34:54 +0000</resolved>
                                                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="174348" author="gerrit" created="Fri, 18 Nov 2016 22:53:27 +0000"  >&lt;p&gt;Patrick Farrell (paf@cray.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/23869&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/23869&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8854&quot; title=&quot;liblustre should not define strlcpy or strlcat&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8854&quot;&gt;&lt;del&gt;LU-8854&lt;/del&gt;&lt;/a&gt; liblustre: do not define strlcpy &amp;amp; strlcat&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fcf24915cbe025b58072fe909f4018497fd4cdcb&lt;/p&gt;</comment>
                            <comment id="205052" author="simmonsja" created="Thu, 10 Aug 2017 16:56:10 +0000"  >&lt;p&gt;Thank you for doing this. I have so been wanting to do this.&lt;/p&gt;</comment>
                            <comment id="206123" author="simmonsja" created="Wed, 23 Aug 2017 14:25:28 +0000"  >&lt;p&gt;Thinking about this do we really need strlcpy and strlcat. snprintf(dst, len, &quot;%s&quot;, src) = strlcpy() and snprintf(dst, len, &quot;%s%s&quot;, src1, src2) = strlcat(). I think we could easily replace the occurrence with snprintf(..).&lt;/p&gt;</comment>
                            <comment id="212077" author="gerrit" created="Thu, 26 Oct 2017 14:56:44 +0000"  >&lt;p&gt;James Simmons (uja.ornl@yahoo.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/29798&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29798&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8854&quot; title=&quot;liblustre should not define strlcpy or strlcat&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8854&quot;&gt;&lt;del&gt;LU-8854&lt;/del&gt;&lt;/a&gt; llapi: replace strlcpy &amp;amp; strlcat with lustre specific version&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 28ca951f440ef9dbe286ef22f9890c8111cb29e4&lt;/p&gt;</comment>
                            <comment id="221757" author="gerrit" created="Tue, 27 Feb 2018 03:46:21 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/29798/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29798/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8854&quot; title=&quot;liblustre should not define strlcpy or strlcat&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8854&quot;&gt;&lt;del&gt;LU-8854&lt;/del&gt;&lt;/a&gt; llapi: remove lustre specific strlcpy &amp;amp; strlcat functions&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 971b0393a6d0e45051c9875efa2c7179cbf7d4c5&lt;/p&gt;</comment>
                            <comment id="221781" author="pjones" created="Tue, 27 Feb 2018 04:34:54 +0000"  >&lt;p&gt;Landed for 2.11&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="47888">LU-9897</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzyw4v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>