public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gcc] rhel-f41-base: 4.1.1-24
@ 2026-06-29 12:22 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2026-06-29 12:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gcc
Branch : rhel-f41-base
Commit : 505db614296a945b13360b0ec2c7bd37eb563667
Author : Jakub Jelinek <jakub@fedoraproject.org>
Date : 2006-09-20T17:51:14+00:00
Stats : +130/-6 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/gcc/c/505db614296a945b13360b0ec2c7bd37eb563667?branch=rhel-f41-base
Log:
4.1.1-24
---
diff --git a/.cvsignore b/.cvsignore
index 2fedd21..e8c58ef 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-gcc-4.1.1-20060917.tar.bz2
+gcc-4.1.1-20060920.tar.bz2
diff --git a/gcc41-strncat-chk.patch b/gcc41-strncat-chk.patch
new file mode 100644
index 0000000..69e0269
--- /dev/null
+++ b/gcc41-strncat-chk.patch
@@ -0,0 +1,112 @@
+2006-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ * tree-ssa-propagate.c (set_rhs): Copy EXPR_LOCATION if
+ needed.
+
+ * builtins.c (expand_builtin, maybe_emit_chk_warning): Handle
+ BUILT_IN_STRNCAT_CHK.
+
+ * gcc.dg/builtin-strncat-chk-1.c: New test.
+
+--- gcc/tree-ssa-propagate.c.jj 2006-04-06 11:33:59.000000000 +0200
++++ gcc/tree-ssa-propagate.c 2006-09-18 14:49:57.000000000 +0200
+@@ -591,6 +591,13 @@ set_rhs (tree *stmt_p, tree expr)
+ else if (code == COMPOUND_EXPR)
+ return false;
+
++ if (EXPR_HAS_LOCATION (stmt)
++ && EXPR_P (expr)
++ && ! EXPR_HAS_LOCATION (expr)
++ && TREE_SIDE_EFFECTS (expr)
++ && TREE_CODE (expr) != LABEL_EXPR)
++ SET_EXPR_LOCATION (expr, EXPR_LOCATION (stmt));
++
+ switch (TREE_CODE (stmt))
+ {
+ case RETURN_EXPR:
+--- gcc/builtins.c.jj 2006-09-02 08:54:22.000000000 +0200
++++ gcc/builtins.c 2006-09-18 16:54:57.000000000 +0200
+@@ -6437,6 +6437,7 @@ expand_builtin (tree exp, rtx target, rt
+ case BUILT_IN_STPCPY_CHK:
+ case BUILT_IN_STRNCPY_CHK:
+ case BUILT_IN_STRCAT_CHK:
++ case BUILT_IN_STRNCAT_CHK:
+ case BUILT_IN_SNPRINTF_CHK:
+ case BUILT_IN_VSNPRINTF_CHK:
+ maybe_emit_chk_warning (exp, fcode);
+@@ -10128,6 +10129,11 @@ maybe_emit_chk_warning (tree exp, enum b
+ arg_mask = 6;
+ is_strlen = 1;
+ break;
++ case BUILT_IN_STRNCAT_CHK:
++ /* For __strncat_chk the warning will be emitted only if overflowing
++ by at least strlen (dest) + 1 bytes. */
++ arg_mask = 12;
++ break;
+ case BUILT_IN_STRNCPY_CHK:
+ arg_mask = 12;
+ break;
+@@ -10165,6 +10171,22 @@ maybe_emit_chk_warning (tree exp, enum b
+ if (! len || ! host_integerp (len, 1) || tree_int_cst_lt (len, size))
+ return;
+ }
++ else if (fcode == BUILT_IN_STRNCAT_CHK)
++ {
++ tree src = TREE_VALUE (TREE_CHAIN (arglist));
++ if (! src || ! host_integerp (len, 1) || tree_int_cst_lt (len, size))
++ return;
++ src = c_strlen (src, 1);
++ if (! src || ! host_integerp (src, 1))
++ {
++ locus = EXPR_LOCATION (exp);
++ warning (0, "%Hcall to %D might overflow destination buffer",
++ &locus, get_callee_fndecl (exp));
++ return;
++ }
++ else if (tree_int_cst_lt (src, size))
++ return;
++ }
+ else if (! host_integerp (len, 1) || ! tree_int_cst_lt (size, len))
+ return;
+
+--- gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c.jj 2006-09-18 13:07:54.000000000 +0200
++++ gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c 2006-09-18 16:55:09.000000000 +0200
+@@ -0,0 +1,38 @@
++/* Test whether buffer overflow warnings for __strncat_chk builtin
++ are emitted properly. */
++/* { dg-do compile } */
++/* { dg-options "-O2 -std=gnu99" } */
++
++extern void abort (void);
++
++#include "../gcc.c-torture/execute/builtins/chk.h"
++
++char buf1[20];
++char *q;
++
++void
++test (int arg, ...)
++{
++ char *p = &buf1[10];
++
++ *p = 0;
++ strncat (p, "abcdefg", 9);
++ *p = 0;
++ strncat (p, "abcdefghi", 9);
++ *p = 0;
++ strncat (p, "abcdefghij", 9);
++ *p = 0;
++ strncat (p, "abcdefghi", 10);
++ *p = 0;
++ strncat (p, "abcdefghij", 10); /* { dg-warning "will always overflow" } */
++ *p = 0;
++ strncat (p, "abcdefgh", 11);
++ *p = 0;
++ strncat (p, "abcdefghijkl", 11); /* { dg-warning "will always overflow" } */
++ *p = 0;
++ strncat (p, q, 9);
++ *p = 0;
++ strncat (p, q, 10); /* { dg-warning "might overflow" } */
++ *p = 0;
++ strncat (p, q, 11); /* { dg-warning "might overflow" } */
++}
diff --git a/gcc41.spec b/gcc41.spec
index aa7d2c7..3ee055e 100644
--- a/gcc41.spec
+++ b/gcc41.spec
@@ -1,6 +1,6 @@
-%define DATE 20060917
+%define DATE 20060920
%define gcc_version 4.1.1
-%define gcc_release 23
+%define gcc_release 24
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64
@@ -144,8 +144,9 @@ Patch35: gcc41-pr27898.patch
Patch36: gcc41-pr26026.patch
Patch37: gcc41-pr28659.patch
Patch38: gcc41-pr27567.patch
-Patch39: gcc41-pr28046.patch
+Patch39: gcc41-pr29097.patch
Patch40: gcc41-pr29059.patch
+Patch41: gcc41-strncat-chk.patch
%define _gnu %{nil}
%ifarch sparc
@@ -467,8 +468,9 @@ which are required to run programs compiled with the GNAT.
%patch36 -p0 -b .pr26026~
%patch37 -p0 -b .pr28659~
%patch38 -p0 -b .pr27567~
-%patch39 -p0 -b .pr28046~
+%patch39 -p0 -b .pr29097~
%patch40 -p0 -b .pr29059~
+%patch41 -p0 -b .strncat-chk~
sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1530,6 +1532,16 @@ fi
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Wed Sep 20 2006 Jakub Jelinek <jakub@redhat.com> 4.1.1-24
+- update from gcc-4_1-branch (-r117000:117069)
+ - PRs fortran/21918, fortran/28526, fortran/28817, fortran/29060,
+ fortran/29101, java/28754, java/28892, java/29013,
+ middle-end/27226, middle-end/4520, tree-optimization/28900
+- fix java.utils.logging.Logger (Mark Wielaard, #207111)
+- fix gnu.javax.net.ssl.provider.SSLSocket (Tom Tromey, #206904)
+- add support for Fortran OpenMP conditional inclusion (PR fortran/29097)
+- add some -D_FORTIFY_SOURCE compile time strncat buffer overflow checks
+
* Sun Sep 17 2006 Jakub Jelinek <jakub@redhat.com> 4.1.1-23
- update from gcc-4_1-branch (-r116958:117000)
- PRs fortran/29051, target/28946
diff --git a/sources b/sources
index 83d7262..c304411 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-30d24a5101c7085b47b97a5a6715a6cd gcc-4.1.1-20060917.tar.bz2
+555f825257d7a7976d77ac4e80ec5ca5 gcc-4.1.1-20060920.tar.bz2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-29 12:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 12:22 [rpms/gcc] rhel-f41-base: 4.1.1-24 Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox