Straight forward replacements of atoi() with strtoul() in order to avoid UB
and detect invalid argument values.
Tested with x86_64-pc-linux-gnu.
2024-12-16 Heiko Eißfeldt
PR lto/114542
* lto-wrapper.cc (run_gcc):
Use strtoul with ERANGE check instead of atoi
* lto/lto.cc
While comparing
```grep ^language= */config-lang.in```
with the list from the doc
I noticed that the last addition rust was missing.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 9109c172039..1904a0e3c12 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2051,7
I think, I overlooked something, so please ignore that. I will prepare
Patch V2 soon.
On 12/9/24 8:13 PM, Heiko Eißfeldt wrote:
Straight forward replacements of atoi() with strtoul() in order to
avoid UB
and detect invalid argument values.
Tested with x86_64-pc-linux-gnu.
2024-12-09 Heiko
Straight forward replacements of atoi() with strtoul() in order to avoid UB
and detect invalid argument values.
Tested with x86_64-pc-linux-gnu.
2024-12-09 Heiko Eißfeldt
PR lto/114542
* lto-wrapper.cc (run_gcc):
Use strtoul with ERANGE check instead of atoi
* lto/lto.cc
; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Heiko Eißfeldt
---
gcc/c/gimple-parser.cc | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/gcc/c/gimple-parser.cc b/gcc/c/gimple-parser.cc
index 78e85d93487..1a677fc26c7 100644
--- a/gcc/c/gimple
this patch.
Signed-off-by: Heiko Eißfeldt
diff --git a/gcc/c/gimple-parser.cc b/gcc/c/gimple-parser.cc
index 78e85d93487..b018bb6afb6 100644
--- a/gcc/c/gimple-parser.cc
+++ b/gcc/c/gimple-parser.cc
@@ -133,11 +133,21 @@ c_parser_gimple_parse_bb_spec (tree val, int *index)
{
if (!startswith (IDENTIFI
and here is the forgotten patch (it is late...)
diff --git a/gcc/c/gimple-parser.cc b/gcc/c/gimple-parser.cc
index 78e85d93487..b018bb6afb6 100644
--- a/gcc/c/gimple-parser.cc
+++ b/gcc/c/gimple-parser.cc
@@ -133,11 +133,21 @@ c_parser_gimple_parse_bb_spec (tree val, int *index)
{
if (!startsw
ic block indices after goto
in both branches otherwise return with c_parser_error
* gcc.dg/pr114541Andrew.c: New test based on
Andrew's template in the PR.
Signed-off-by: Heiko Eißfeldt
On 12/5/24 8:45 AM, Richard Biener wrote:
On Thu, Dec 5, 2024 at 1:55 AM Heiko Ei
On 12/5/24 8:45 AM, Richard Biener wrote:
c_parser_gimple_compound_statement returns whether the
compound statement ended with a return statement, not
whether there was an error, so this change looks wrong.
Thanks, I will have to dig deeper to understand error handling then.
Heiko
errors
more generically. In the case of cdil != cdil_gimple
now consider them as errors and return early.
This avoids further processing with erroneous data.
2024-12-05 Heiko Eißfeldt
PR c/114541
* gimple-parser.cc (c_parser_gimple_parse_bb_spec):
Use strtoul with ERANGE check
ac9fc91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-11-28 Heiko Eißfeldt
+
+ * MAINTAINERS: Add myself to write after approval.
+
2024-11-25 Sandra Loosemore
* MAINTAINERS: Remove references to nios2.
diff --git a/MAINTAINERS b/MAINTAINERS
index 26455d1cabf..0fab
Thanks for your patience!
On 11/26/24 8:36 AM, Jakub Jelinek wrote:
This is wrongly formatted and valid only in C++17 and later, while
GCC is currently written in C++14.
So it needs to be
static_assert (FIRST_PSEUDO_REGISTER <= INT_MAX, "");
done.
Heikodiff --git a/gcc/varasm.cc
Thanks for your feedback!
On 11/23/24 11:02 PM, Jakub Jelinek wrote:
On Sat, Nov 23, 2024 at 07:26:55PM +0100, Heiko Eißfeldt wrote:
--- a/gcc/varasm.cc
+++ b/gcc/varasm.cc
@@ -993,9 +993,12 @@ decode_reg_name_and_count (const char *asmspec, int
*pnregs)
break;
if (asmspec[0
:
On 11/22/24 7:40 AM, Heiko Eißfeldt wrote:
A simple replacement of atoi() with strtol() in
varasm.cc:decode_reg_name_and_count().
Parsing now has errno ERANGE checking, eg no undetected overflow.
Being new it is difficult for me to come up with a good test case.
So I don't see any tech
A simple replacement of atoi() with strtol() in
varasm.cc:decode_reg_name_and_count().
Parsing now has errno ERANGE checking, eg no undetected overflow.
Being new it is difficult for me to come up with a good test case.
---
diff --git a/gcc/varasm.cc b/gcc/varasm.cc
index acc4b4a0419..d3c60eaf4
15 matches
Mail list logo