public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c
       [not found] <20030516035600.10810.tenm078902@sanyo.co.jp>
@ 2003-05-24 20:14 ` pinskia@physics.uc.edu
  2003-05-24 21:42 ` dave@hiauly1.hia.nrc.ca
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-24 20: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=10810


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dave.anglin@nrc.ca


------- Additional Comments From zack@gcc.gnu.org  2003-05-24 02:14 -------
No.  The one-line patch is wrong.  Note the comment above the #define that
got changed: "read a single line *of arbitrary length* from standard input."
That LINELEN define is the *initial* buffer size; getline() is supposed to
enlarge its buffer as needed.

It appears that there is a fencepost error, where the buffer will be overflowed
by one character iff the input line is exactly as long as the buffer.  The
correct fix, then, would be this change, somewhat below:

-      if (count >= alloc)
+      if (count + 1 >= alloc)

I do not have time right now to test that, and I don't see the failure anyway;
could one of you try it and check it in if it works?


------- Additional Comments From pinskia@physics.uc.edu  2003-05-24 20:03 -------
*** Bug 8346 has been marked as a duplicate of this bug. ***



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c
       [not found] <20030516035600.10810.tenm078902@sanyo.co.jp>
  2003-05-24 20:14 ` [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c pinskia@physics.uc.edu
@ 2003-05-24 21:42 ` dave@hiauly1.hia.nrc.ca
  2003-05-25 13:09 ` dave@hiauly1.hia.nrc.ca
  2003-06-05 17:50 ` danglin@gcc.gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dave@hiauly1.hia.nrc.ca @ 2003-05-24 21:42 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=10810



------- Additional Comments From dave@hiauly1.hia.nrc.ca  2003-05-24 20:57 -------
Subject: Re: [Bug other/10810] gcc-3.3 fails make check: buffer overrun in tes

I'm at the summit for the next two days, then leave for Europe Monday
evening.  Could someone else try the suggested fix?

> 
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10810
> 
> 
> pinskia@physics.uc.edu changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |dave.anglin@nrc.ca
> 
> 
> ------- Additional Comments From zack@gcc.gnu.org  2003-05-24 02:14 -------
> No.  The one-line patch is wrong.  Note the comment above the #define that
> got changed: "read a single line *of arbitrary length* from standard input."
> That LINELEN define is the *initial* buffer size; getline() is supposed to
> enlarge its buffer as needed.
> 
> It appears that there is a fencepost error, where the buffer will be
> overflowed
> by one character iff the input line is exactly as long as the buffer.  The
> correct fix, then, would be this change, somewhat below:
> 
> -      if (count >= alloc)
> +      if (count + 1 >= alloc)
> 
> I do not have time right now to test that, and I don't see the failure
> anyway;
> could one of you try it and check it in if it works?
> 
> 
> ------- Additional Comments From pinskia@physics.uc.edu  2003-05-24 20:03
> -------
> *** Bug 8346 has been marked as a duplicate of this bug. ***
> 
> 
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
> 






------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c
       [not found] <20030516035600.10810.tenm078902@sanyo.co.jp>
  2003-05-24 20:14 ` [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c pinskia@physics.uc.edu
  2003-05-24 21:42 ` dave@hiauly1.hia.nrc.ca
@ 2003-05-25 13:09 ` dave@hiauly1.hia.nrc.ca
  2003-06-05 17:50 ` danglin@gcc.gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dave@hiauly1.hia.nrc.ca @ 2003-05-25 13:09 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=10810



------- Additional Comments From dave@hiauly1.hia.nrc.ca  2003-05-25 12:14 -------
Subject: Re: [Bug other/10810] gcc-3.3 fails make check: buffer overrun in tes

> by one character iff the input line is exactly as long as the buffer.  The
> correct fix, then, would be this change, somewhat below:
> 
> -      if (count >= alloc)
> +      if (count + 1 >= alloc)

This works.  Tested on hppa2.0-hp-hpux11.11 and hppa64-hp-hpux11.11.

Dave




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c
       [not found] <20030516035600.10810.tenm078902@sanyo.co.jp>
                   ` (2 preceding siblings ...)
  2003-05-25 13:09 ` dave@hiauly1.hia.nrc.ca
@ 2003-06-05 17:50 ` danglin@gcc.gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: danglin@gcc.gnu.org @ 2003-06-05 17:50 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=10810


danglin@gcc.gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From danglin@gcc.gnu.org  2003-06-05 17:50 -------
See: <http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00443.html>.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c
@ 2003-05-24  2:29 bangerth@dealii.org
  0 siblings, 0 replies; 5+ messages in thread
From: bangerth@dealii.org @ 2003-05-24  2:29 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=10810


bangerth@dealii.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zack@codesourcery.com
            Summary|gcc-3.3 fails make check    |gcc-3.3 fails make check:
                   |                            |buffer overrun in
                   |                            |test_demangle.c


------- Additional Comments From bangerth@dealii.org  2003-05-24 01:08 -------
Zack, I couldn't find where this file came from exactly, but you checked
it in. I think the one-line patch here is safe. Can you take care of this PR?

Thanks  
  W.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2003-06-05 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030516035600.10810.tenm078902@sanyo.co.jp>
2003-05-24 20:14 ` [Bug other/10810] gcc-3.3 fails make check: buffer overrun in test_demangle.c pinskia@physics.uc.edu
2003-05-24 21:42 ` dave@hiauly1.hia.nrc.ca
2003-05-25 13:09 ` dave@hiauly1.hia.nrc.ca
2003-06-05 17:50 ` danglin@gcc.gnu.org
2003-05-24  2:29 bangerth@dealii.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).