public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ?
@ 2014-08-08 18:05 dcb314 at hotmail dot com
2014-08-08 18:50 ` [Bug libgcj/62068] " tromey at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2014-08-08 18:05 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
Bug ID: 62068
Summary: libjava/prims.cc:807: possible missing call to va_end
?
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libgcj
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
[trunk/libjava/prims.cc:807]: (error) va_list 'args' was opened but not closed
by va_end().
for (int i = 0; i < dimensions; ++i)
{
jint size = va_arg (args, jint);
if (size < 0)
throw new java::lang::NegativeArraySizeException;
Suggest add call to va_end just before throw.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
@ 2014-08-08 18:50 ` tromey at gcc dot gnu.org
2014-08-08 19:46 ` schwab@linux-m68k.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-08-08 18:50 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
Tom Tromey <tromey at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu.org
--- Comment #1 from Tom Tromey <tromey at gcc dot gnu.org> ---
I thought va_start and va_end could expand to anything,
including code to introduce and close a block, so they
needed to be lexically paired.
This means that the fix here would have to rewrite
the logic in the function a little bit.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
2014-08-08 18:50 ` [Bug libgcj/62068] " tromey at gcc dot gnu.org
@ 2014-08-08 19:46 ` schwab@linux-m68k.org
2014-08-08 19:57 ` tromey at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2014-08-08 19:46 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
There is no such requirement for va_start/va_end. You are probably thinking of
pthread_cleanup_push/pop.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
2014-08-08 18:50 ` [Bug libgcj/62068] " tromey at gcc dot gnu.org
2014-08-08 19:46 ` schwab@linux-m68k.org
@ 2014-08-08 19:57 ` tromey at gcc dot gnu.org
2014-08-08 20:12 ` schwab@linux-m68k.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-08-08 19:57 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
--- Comment #3 from Tom Tromey <tromey at gcc dot gnu.org> ---
It was documented that way on some systems.
Eg: http://www.cs.rit.edu/~hpb/Man/_Man_SunOS_4.1.3_html/html3/varargs.3.html
Perhaps that isn't operative language any more;
I guess I'm mildly curious to know.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
` (2 preceding siblings ...)
2014-08-08 19:57 ` tromey at gcc dot gnu.org
@ 2014-08-08 20:12 ` schwab@linux-m68k.org
2014-08-08 20:17 ` tromey at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2014-08-08 20:12 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
varargs isn't stdargs.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
` (3 preceding siblings ...)
2014-08-08 20:12 ` schwab@linux-m68k.org
@ 2014-08-08 20:17 ` tromey at gcc dot gnu.org
2014-08-08 20:26 ` dcb314 at hotmail dot com
2014-08-08 20:55 ` schwab@linux-m68k.org
6 siblings, 0 replies; 8+ messages in thread
From: tromey at gcc dot gnu.org @ 2014-08-08 20:17 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
--- Comment #5 from Tom Tromey <tromey at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #4)
> varargs isn't stdargs.
Doh. Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
` (4 preceding siblings ...)
2014-08-08 20:17 ` tromey at gcc dot gnu.org
@ 2014-08-08 20:26 ` dcb314 at hotmail dot com
2014-08-08 20:55 ` schwab@linux-m68k.org
6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2014-08-08 20:26 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Andreas Schwab from comment #2)
> There is no such requirement for va_start/va_end.
I am not sure what you mean here. I checked K & R 2
and va_start and va_end seem to be a matched pair
to me.
AFAIK, each va_end is 121 with each va_start.
In practice, some systems might be able to handle one
of them being missing, but the language requirement is
still there.
Unless you know different ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libgcj/62068] libjava/prims.cc:807: possible missing call to va_end ?
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
` (5 preceding siblings ...)
2014-08-08 20:26 ` dcb314 at hotmail dot com
@ 2014-08-08 20:55 ` schwab@linux-m68k.org
6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2014-08-08 20:55 UTC (permalink / raw)
To: java-prs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62068
--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
Please reread comment#1.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-08 20:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08 18:05 [Bug libgcj/62068] New: libjava/prims.cc:807: possible missing call to va_end ? dcb314 at hotmail dot com
2014-08-08 18:50 ` [Bug libgcj/62068] " tromey at gcc dot gnu.org
2014-08-08 19:46 ` schwab@linux-m68k.org
2014-08-08 19:57 ` tromey at gcc dot gnu.org
2014-08-08 20:12 ` schwab@linux-m68k.org
2014-08-08 20:17 ` tromey at gcc dot gnu.org
2014-08-08 20:26 ` dcb314 at hotmail dot com
2014-08-08 20:55 ` schwab@linux-m68k.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).