public inbox for
help / color / mirror / Atom feed
* java/10878: miscompilation of boolean parameters from bytecode
@ 2003-05-20  8:16 szabo.daniel
  0 siblings, 0 replies; only message in thread
From: szabo.daniel @ 2003-05-20  8:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         10878
>Category:       java
>Synopsis:       miscompilation of boolean parameters from bytecode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 20 08:16:01 UTC 2003
>Release:        3.2.2
mingw, linux
Boolean parameter will be misinterpreted when compiled from bytecode rather than from java source.
See in assembly (when compiled without any optimizations):
movb	%al, -1(%ebp)
then referencing the variable:
movl	-8(%ebp), %edx
Compile the java source to bytecode, then compile it with gcj to produce assembly listing. Watch for the parameter representation of the boolean variable in the stack.
Compile from java source OR avoid booleans (use ints instead). Note: java bytecode treats booleans as ints already. They shouldn't be treaten like booleans, unless you want packed boolean arrays, which occurs very very rarely.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-20  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-20  8:16 java/10878: miscompilation of boolean parameters from bytecode szabo.daniel

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).