devtools: fix version variable not initialized
Checks
Commit Message
The version variable is not initialized. Therefore, if the -V option
is not specified, the value of $version is obtained from the context,
which may cause the version map parsing failure.
Fixes: 6edec7f202ac ("devtools: list symbols by version")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
buildtools/map-list-symbol.sh | 1 +
1 file changed, 1 insertion(+)
Comments
On Wed, Apr 17, 2024 at 11:32 AM Dengdui Huang <huangdengdui@huawei.com> wrote:
>
> The version variable is not initialized. Therefore, if the -V option
> is not specified, the value of $version is obtained from the context,
> which may cause the version map parsing failure.
>
> Fixes: 6edec7f202ac ("devtools: list symbols by version")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
This is an internal script and I wonder how the mentionned issue is hit.
In any case this fix is correct.
Reviewed-by: David Marchand <david.marchand@redhat.com>
On 2024/6/27 22:28, David Marchand wrote:
> On Wed, Apr 17, 2024 at 11:32 AM Dengdui Huang <huangdengdui@huawei.com> wrote:
>>
>> The version variable is not initialized. Therefore, if the -V option
>> is not specified, the value of $version is obtained from the context,
>> which may cause the version map parsing failure.
>>
>> Fixes: 6edec7f202ac ("devtools: list symbols by version")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
>
> This is an internal script and I wonder how the mentionned issue is hit.
> In any case this fix is correct.
>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
>
>
Thanks for your review.
The project build script may pass version information through environment variables.
This problem occurs if the following execution sequence exists:
export version=devel
meson build
ninja -C build
On Thu, Jun 27, 2024 at 4:28 PM David Marchand
<david.marchand@redhat.com> wrote:
> On Wed, Apr 17, 2024 at 11:32 AM Dengdui Huang <huangdengdui@huawei.com> wrote:
> >
> > The version variable is not initialized. Therefore, if the -V option
> > is not specified, the value of $version is obtained from the context,
> > which may cause the version map parsing failure.
> >
> > Fixes: 6edec7f202ac ("devtools: list symbols by version")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
@@ -5,6 +5,7 @@
section=all
symbol=all
quiet=
+version=
while getopts 'S:s:qV:' name; do
case $name in