public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/12014] New: strcpy used with overlapping arguments
@ 2003-08-21 17:45 hermantenbrugge at home dot nl
2003-08-21 18:02 ` [Bug ada/12014] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hermantenbrugge at home dot nl @ 2003-08-21 17:45 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12014
Summary: strcpy used with overlapping arguments
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hermantenbrugge at home dot nl
CC: gcc-bugs at gcc dot gnu dot org
I just ran bounds-checking on the gcc-3.3.1 release. It produced an error in
adadecode.c. The problem is that it contains code like:
strcpy (ada_name, ada_name + 5);
strcpy (tktoken, tktoken + 2);
strcpy (ada_name + k + 1, ada_name + k + 2);
All of these strcpy's are illegal because the source and destination pointer
overlap.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/12014] strcpy used with overlapping arguments
2003-08-21 17:45 [Bug ada/12014] New: strcpy used with overlapping arguments hermantenbrugge at home dot nl
@ 2003-08-21 18:02 ` pinskia at gcc dot gnu dot org
2003-08-23 1:27 ` dhazeghi at yahoo dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-21 18:02 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12014
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-08-21 18:02:51
date| |
Version|3.4 |3.3.1
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-21 18:02 -------
The ada front-end is the worst front-end I have ever seen in terms of problems.
I can confirm these still exists on the mainline.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/12014] strcpy used with overlapping arguments
2003-08-21 17:45 [Bug ada/12014] New: strcpy used with overlapping arguments hermantenbrugge at home dot nl
2003-08-21 18:02 ` [Bug ada/12014] " pinskia at gcc dot gnu dot org
@ 2003-08-23 1:27 ` dhazeghi at yahoo dot com
2003-10-24 13:06 ` cvs-commit at gcc dot gnu dot org
2003-10-24 13:14 ` charlet at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23 1:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12014
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/12014] strcpy used with overlapping arguments
2003-08-21 17:45 [Bug ada/12014] New: strcpy used with overlapping arguments hermantenbrugge at home dot nl
2003-08-21 18:02 ` [Bug ada/12014] " pinskia at gcc dot gnu dot org
2003-08-23 1:27 ` dhazeghi at yahoo dot com
@ 2003-10-24 13:06 ` cvs-commit at gcc dot gnu dot org
2003-10-24 13:14 ` charlet at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-24 13:06 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12014
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-24 13:02 -------
Subject: Bug 12014
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: charlet@gcc.gnu.org 2003-10-24 13:02:42
Modified files:
gcc/ada : adadecode.c exp_disp.adb g-catiio.adb make.adb
Makefile.generic prj-env.adb prj-env.ads
sem_ch12.adb sem_ch3.adb sem_ch3.ads
adadecode.h atree.h elists.h nlists.h raise.h
Make-lang.in
Log message:
* adadecode.c (ostrcpy): New function.
(__gnat_decode): Use ostrcpy of strcpy.
(has_prefix): Set first parameter a const.
(has_suffix): Set first parameter a const.
Update copyright notice. Fix source name in header.
Removes a trailing space.
PR ada/12014.
* exp_disp.adb:
Remove the test against being in No_Run_Time_Mode before generating a
call to Register_Tag. It is redundant with the test against the
availability of the function Register_Tag.
* g-catiio.adb: (Month_Name): Correct spelling of February
* make.adb: (Mains): New package
(Initialize): Call Mains.Delete
(Gnatmake): Check that each main on the command line is a source of a
project file and, if there are several mains, each of them is a source
of the same project file.
(Gnatmake): When a foreign language is specified in attribute Languages,
no main is specified on the command line and attribute Mains is not
empty, only build the Ada main. If there is no Ada main, just compile
the Ada sources and their closure.
(Gnatmake): If a main is specified on the command line with directory
information, check that the source exists and, if it does, that the path
is the actual path of a source of a project.
* prj-env.adb:
(File_Name_Of_Library_Unit_Body): New Boolean parameter Full_Path. When
Full_Path is True, return the full path instead of the simple file name.
(Project_Of): New function
* prj-env.ads:
(File_Name_Of_Library_Unit_Body): New Boolean parameter Full_Path,
defaulted to False.
(Project_Of): New function
* Makefile.generic:
Ensure objects of main project are always checked and rebuilt if needed.
Set CC to gcc by default.
Prepare new handling of link by creating a global archive (not activated
yet).
* adadecode.h, atree.h, elists.h, nlists.h, raise.h,
stringt.h: Update copyright notice. Remove trailing blanks.
Fix source name in header.
* sem_ch12.adb: Minor reformatting
* sem_ch3.adb:
Minor reformatting (including new function return style throughout)
* sem_ch3.ads:
Minor reformatting (including new function return style throughout)
* Make-lang.in: Makefile automatically updated
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/adadecode.c.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_disp.adb.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/g-catiio.adb.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/make.adb.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/Makefile.generic.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/prj-env.adb.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/prj-env.ads.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_ch12.adb.diff?cvsroot=gcc&r1=1.22&r2=1.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_ch3.adb.diff?cvsroot=gcc&r1=1.19&r2=1.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_ch3.ads.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/adadecode.h.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/atree.h.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/elists.h.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/nlists.h.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/raise.h.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/Make-lang.in.diff?cvsroot=gcc&r1=1.43&r2=1.44
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/12014] strcpy used with overlapping arguments
2003-08-21 17:45 [Bug ada/12014] New: strcpy used with overlapping arguments hermantenbrugge at home dot nl
` (2 preceding siblings ...)
2003-10-24 13:06 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-24 13:14 ` charlet at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: charlet at gcc dot gnu dot org @ 2003-10-24 13:14 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12014
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4
------- Additional Comments From charlet at gcc dot gnu dot org 2003-10-24 13:06 -------
Fixed in mainline.
I'm not 100% happy with the fix, but at least the current code won't overlap.
Arno
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-24 13:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-21 17:45 [Bug ada/12014] New: strcpy used with overlapping arguments hermantenbrugge at home dot nl
2003-08-21 18:02 ` [Bug ada/12014] " pinskia at gcc dot gnu dot org
2003-08-23 1:27 ` dhazeghi at yahoo dot com
2003-10-24 13:06 ` cvs-commit at gcc dot gnu dot org
2003-10-24 13:14 ` charlet at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).