[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix for bug #85
Thank you for your patches for bugs 84 and 85.
I have applied your patch for bug 85.
For bug 84, I have not applied your patch for two reasons:
1. I think the SourceFile attributes should only be kept when a
command-line switch is given, along the lines of keep-line-number and
keep-bytecode-offset. This is a trivial change that I can make.
2. Soot doesn't appear to have support for writing class attributes to
jasmin and then to class files. I think we should add such support
before adding support for SourceFile attributes so that these attributes
are written out correctly as well as read in. I don't know much about
how the jasmin output code works. Does anyone want to take a stab at
this?
Ondrej
On Tue, Jan 27, 2004 at 09:40:49PM -0600, Archie Cobbs wrote:
> Hi,
>
> I reported a bug and then found a fix, but can't seem to update
> the bug in the bug DB. So here's the fix (at least it seems to
> work) for bug #85.
>
> The fix is: if INVOKEVIRUTAL or INVOKEINTERFACE specifies a method
> of an array class, replace the array class name with "java.lang.Object"
> and proceed.
>
> Thanks,
> -Archie
>
> __________________________________________________________________________
> Archie Cobbs * Halloo Communications * http://www.halloo.com
>
> diff -ur --new-file soot-2.1.0.orig/src/soot/coffi/CFG.java soot-2.1.0/src/soot/coffi/CFG.java
> --- soot-2.1.0.orig/src/soot/coffi/CFG.java 2003-12-18 11:43:05.000000000 -0600
> +++ soot-2.1.0/src/soot/coffi/CFG.java 2004-01-27 21:17:22.000000000 -0600
> @@ -4431,6 +4431,9 @@
> String methodDescriptor = ((CONSTANT_Utf8_info) (constant_pool[i.descriptor_index])).
> convert();
>
> + if (className.charAt(0) == '[')
> + className = "java.lang.Object";
> +
> SootClass bclass = cm.getSootClass(className);
>
> Local[] parameters;
> @@ -4660,6 +4663,9 @@
> String methodDescriptor = ((CONSTANT_Utf8_info) (constant_pool[i.descriptor_index])).
> convert();
>
> + if (className.charAt(0) == '[')
> + className = "java.lang.Object";
> +
> SootClass bclass = cm.getSootClass(className);
>
> Local[] parameters;
>