public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2] BaseTools: Resolve index out of range errors.
@ 2020-11-13  7:33 Mingyue Liang
  2020-11-16  0:40 ` Yuwei Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mingyue Liang @ 2020-11-13  7:33 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen

This problem is generated by solving bz2972's
patch, and the commit ID is
0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.

This is a problem when updating the DEPs file.
The code does not consider that there is only
one line of content in the file, so the filter
condition is added to prevent the index from
exceeding the range.

Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---

V2:
  Change the title to make it clearer and more descriptive.
  
 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
index b06ef42573fd..5ec26eb98b42 100644
--- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
@@ -291,7 +291,8 @@ ${END}
                 targetitem = self.GetRealTarget(source_abs.strip(" :"))
 
                 targetitem += ": "
-                targetitem += lines[1]
+                if len(lines)>=2:
+                    targetitem += lines[1]
                 newcontent.append(targetitem)
                 newcontent.extend(lines[2:])
                 newcontent.append("\n")
-- 
2.29.2.windows.2


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

* Re: [PATCH V2] BaseTools: Resolve index out of range errors.
  2020-11-13  7:33 [PATCH V2] BaseTools: Resolve index out of range errors Mingyue Liang
@ 2020-11-16  0:40 ` Yuwei Chen
  2020-11-18  1:40 ` Bob Feng
       [not found] ` <164876971E6C4F0C.5807@groups.io>
  2 siblings, 0 replies; 6+ messages in thread
From: Yuwei Chen @ 2020-11-16  0:40 UTC (permalink / raw)
  To: Liang, MingyueX, devel@edk2.groups.io; +Cc: Feng, Bob C, Liming Gao

Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>

> -----Original Message-----
> From: Mingyue Liang <mingyuex.liang@intel.com>
> Sent: Friday, November 13, 2020 3:33 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [PATCH V2] BaseTools: Resolve index out of range errors.
> 
> This problem is generated by solving bz2972's patch, and the commit ID is
> 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.
> 
> This is a problem when updating the DEPs file.
> The code does not consider that there is only one line of content in the file,
> so the filter condition is added to prevent the index from exceeding the
> range.
> 
> Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> 
> V2:
>   Change the title to make it clearer and more descriptive.
> 
>  BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> index b06ef42573fd..5ec26eb98b42 100644
> --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> @@ -291,7 +291,8 @@ ${END}
>                  targetitem = self.GetRealTarget(source_abs.strip(" :"))
> 
>                  targetitem += ": "
> -                targetitem += lines[1]
> +                if len(lines)>=2:
> +                    targetitem += lines[1]
>                  newcontent.append(targetitem)
>                  newcontent.extend(lines[2:])
>                  newcontent.append("\n")
> --
> 2.29.2.windows.2


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

* Re: [PATCH V2] BaseTools: Resolve index out of range errors.
  2020-11-13  7:33 [PATCH V2] BaseTools: Resolve index out of range errors Mingyue Liang
  2020-11-16  0:40 ` Yuwei Chen
@ 2020-11-18  1:40 ` Bob Feng
       [not found] ` <164876971E6C4F0C.5807@groups.io>
  2 siblings, 0 replies; 6+ messages in thread
From: Bob Feng @ 2020-11-18  1:40 UTC (permalink / raw)
  To: Liang, MingyueX, devel@edk2.groups.io; +Cc: Liming Gao, Chen, Christine

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Mingyue Liang <mingyuex.liang@intel.com> 
Sent: Friday, November 13, 2020 3:33 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH V2] BaseTools: Resolve index out of range errors.

This problem is generated by solving bz2972's patch, and the commit ID is 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.

This is a problem when updating the DEPs file.
The code does not consider that there is only one line of content in the file, so the filter condition is added to prevent the index from exceeding the range.

Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---

V2:
  Change the title to make it clearer and more descriptive.
  
 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
index b06ef42573fd..5ec26eb98b42 100644
--- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
@@ -291,7 +291,8 @@ ${END}
                 targetitem = self.GetRealTarget(source_abs.strip(" :"))
 
                 targetitem += ": "
-                targetitem += lines[1]
+                if len(lines)>=2:
+                    targetitem += lines[1]
                 newcontent.append(targetitem)
                 newcontent.extend(lines[2:])
                 newcontent.append("\n")
--
2.29.2.windows.2


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

* Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range errors.
       [not found] ` <164876971E6C4F0C.5807@groups.io>
@ 2020-11-18  2:23   ` Bob Feng
  2020-11-18  5:36     ` 回复: " gaoliming
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Feng @ 2020-11-18  2:23 UTC (permalink / raw)
  To: devel@edk2.groups.io, Feng, Bob C, Liang, MingyueX
  Cc: Liming Gao, Chen, Christine

This patch is to fix a basetools regression issue. If there is no objection, I'll merge it tomorrow.

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
Sent: Wednesday, November 18, 2020 9:41 AM
To: Liang, MingyueX <mingyuex.liang@intel.com>; devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range errors.

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Mingyue Liang <mingyuex.liang@intel.com> 
Sent: Friday, November 13, 2020 3:33 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH V2] BaseTools: Resolve index out of range errors.

This problem is generated by solving bz2972's patch, and the commit ID is 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.

This is a problem when updating the DEPs file.
The code does not consider that there is only one line of content in the file, so the filter condition is added to prevent the index from exceeding the range.

Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---

V2:
  Change the title to make it clearer and more descriptive.
  
 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
index b06ef42573fd..5ec26eb98b42 100644
--- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
@@ -291,7 +291,8 @@ ${END}
                 targetitem = self.GetRealTarget(source_abs.strip(" :"))
 
                 targetitem += ": "
-                targetitem += lines[1]
+                if len(lines)>=2:
+                    targetitem += lines[1]
                 newcontent.append(targetitem)
                 newcontent.extend(lines[2:])
                 newcontent.append("\n")
--
2.29.2.windows.2







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

* 回复: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range errors.
  2020-11-18  2:23   ` [edk2-devel] " Bob Feng
@ 2020-11-18  5:36     ` gaoliming
  2020-11-19  2:18       ` Bob Feng
  0 siblings, 1 reply; 6+ messages in thread
From: gaoliming @ 2020-11-18  5:36 UTC (permalink / raw)
  To: devel, bob.c.feng, 'Liang, MingyueX'; +Cc: 'Chen, Christine'

Bob:
  I am ok to merge this bug fix for this stable tag. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+67662+4905953+8761045@groups.io
> <bounce+27952+67662+4905953+8761045@groups.io> 代表 Bob Feng
> 发送时间: 2020年11月18日 10:24
> 收件人: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Liang,
> MingyueX <mingyuex.liang@intel.com>
> 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine
> <yuwei.chen@intel.com>
> 主题: Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range
> errors.
> 
> This patch is to fix a basetools regression issue. If there is no objection, I'll
> merge it tomorrow.
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
> Sent: Wednesday, November 18, 2020 9:41 AM
> To: Liang, MingyueX <mingyuex.liang@intel.com>; devel@edk2.groups.io
> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine
> <yuwei.chen@intel.com>
> Subject: Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range
> errors.
> 
> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
> 
> -----Original Message-----
> From: Mingyue Liang <mingyuex.liang@intel.com>
> Sent: Friday, November 13, 2020 3:33 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [PATCH V2] BaseTools: Resolve index out of range errors.
> 
> This problem is generated by solving bz2972's patch, and the commit ID is
> 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.
> 
> This is a problem when updating the DEPs file.
> The code does not consider that there is only one line of content in the file, so
> the filter condition is added to prevent the index from exceeding the range.
> 
> Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> 
> V2:
>   Change the title to make it clearer and more descriptive.
> 
>  BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> index b06ef42573fd..5ec26eb98b42 100644
> --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> @@ -291,7 +291,8 @@ ${END}
>                  targetitem = self.GetRealTarget(source_abs.strip(" :"))
> 
>                  targetitem += ": "
> -                targetitem += lines[1]
> +                if len(lines)>=2:
> +                    targetitem += lines[1]
>                  newcontent.append(targetitem)
>                  newcontent.extend(lines[2:])
>                  newcontent.append("\n")
> --
> 2.29.2.windows.2
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 




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

* Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range errors.
  2020-11-18  5:36     ` 回复: " gaoliming
@ 2020-11-19  2:18       ` Bob Feng
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Feng @ 2020-11-19  2:18 UTC (permalink / raw)
  To: gaoliming, devel@edk2.groups.io, Liang, MingyueX; +Cc: Chen, Christine

I created a PR, https://github.com/tianocore/edk2/pull/1134

Thanks,
Bob

-----Original Message-----
From: gaoliming <gaoliming@byosoft.com.cn> 
Sent: Wednesday, November 18, 2020 1:37 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Liang, MingyueX <mingyuex.liang@intel.com>
Cc: Chen, Christine <yuwei.chen@intel.com>
Subject: 回复: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range errors.

Bob:
  I am ok to merge this bug fix for this stable tag. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+67662+4905953+8761045@groups.io
> <bounce+27952+67662+4905953+8761045@groups.io> 代表 Bob Feng
> 发送时间: 2020年11月18日 10:24
> 收件人: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Liang, 
> MingyueX <mingyuex.liang@intel.com>
> 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine 
> <yuwei.chen@intel.com>
> 主题: Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range 
> errors.
> 
> This patch is to fix a basetools regression issue. If there is no 
> objection, I'll merge it tomorrow.
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob 
> Feng
> Sent: Wednesday, November 18, 2020 9:41 AM
> To: Liang, MingyueX <mingyuex.liang@intel.com>; devel@edk2.groups.io
> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine 
> <yuwei.chen@intel.com>
> Subject: Re: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of 
> range errors.
> 
> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
> 
> -----Original Message-----
> From: Mingyue Liang <mingyuex.liang@intel.com>
> Sent: Friday, November 13, 2020 3:33 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao 
> <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [PATCH V2] BaseTools: Resolve index out of range errors.
> 
> This problem is generated by solving bz2972's patch, and the commit ID 
> is 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.
> 
> This is a problem when updating the DEPs file.
> The code does not consider that there is only one line of content in 
> the file, so the filter condition is added to prevent the index from exceeding the range.
> 
> Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> 
> V2:
>   Change the title to make it clearer and more descriptive.
> 
>  BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> index b06ef42573fd..5ec26eb98b42 100644
> --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> @@ -291,7 +291,8 @@ ${END}
>                  targetitem = self.GetRealTarget(source_abs.strip(" 
> :"))
> 
>                  targetitem += ": "
> -                targetitem += lines[1]
> +                if len(lines)>=2:
> +                    targetitem += lines[1]
>                  newcontent.append(targetitem)
>                  newcontent.extend(lines[2:])
>                  newcontent.append("\n")
> --
> 2.29.2.windows.2
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 




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

end of thread, other threads:[~2020-11-19  2:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13  7:33 [PATCH V2] BaseTools: Resolve index out of range errors Mingyue Liang
2020-11-16  0:40 ` Yuwei Chen
2020-11-18  1:40 ` Bob Feng
     [not found] ` <164876971E6C4F0C.5807@groups.io>
2020-11-18  2:23   ` [edk2-devel] " Bob Feng
2020-11-18  5:36     ` 回复: " gaoliming
2020-11-19  2:18       ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox