Status Update
Comments
ch...@google.com <ch...@google.com> #2
i donnot understand why is the data the same?
Co...@163.com <Co...@163.com> #3
Co...@163.com <Co...@163.com> #4
What steps are needed to reproduce this issue? Frequency of occurrence?
Which Android build are you using? (e.g. AP4A.241205.013.A1)
Which device did you use to reproduce this issue?
Can you confirm if this issue is reproducible on a Pixel/Nexus device?
Please provide a sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report and screenshot to google drive and share the folder to android-bugreport@google.com, then share the link here.
ch...@google.com <ch...@google.com> #5
Please provide the requested information to proceed further. Unfortunately the issue will be closed within 7 days if there is no further update.
Co...@163.com <Co...@163.com> #6
for example,we hava 100 users.
20 users returned the same location information, longitude is 121.474000 and latitude is 31.230001。
30 users returned the same location information, longitude is 122.474000 and latitude is 32.230001。
15 users returned the same location information, longitude is 120.474000 and latitude is 30.230001。
as for Android build,all versions have it.
I dont reprodouce this issue.
what may be the cause of this issue?please
ch...@google.com <ch...@google.com> #7
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
Co...@163.com <Co...@163.com> #8
Thanks for reporting this issue.
COARSE_LOCATION typically takes location information from the nearby cell tower. If many users are near the same cell tower, each of those users will be given the same position. Using a FINE position will give much more detailed information.
Also, in certain areas, for privacy reasons, a less-exact location will be given, and that less-exact location might be identical for many users. Again, a fine-location configuration will return more precise location data.
ch...@google.com <ch...@google.com> #9
We believe with reference to the above comment, your query has been answered, hence closing the bug. Please feel free to re-open the issue in the future if desired.
ch...@google.com <ch...@google.com> #10
ch...@google.com <ch...@google.com> #11
Indeed this is done in
ch...@google.com <ch...@google.com> #12
It looks as if the given input bytecode is invalid to me.
0: aload_0
1: getfield #25 // Field org/.../GF2nField.mDegree:I
4: dup
5: dup2
6: istore_2
7: multianewarray #36, 2 // class "[[I"
11: iload_2
12: multianewarray #36, 2 // class "[[I"
After the dup2
, the stack is [mDegree:I, mDegree:I, mDegree:I, mDegree:I]. Then we istore_2
so before the first multianewarray
we have [mDegree:I, mDegree:I, mDegree:I]. IIUC, multianewarray
consumes two ints from the stack, so it leaves the stack as [mDegree:I, arr7:[[I]. Then we iload_2
and get [mDegree:I, arr7:[[I, mDegree:I], and then again do multianewarray
, which should consume two ints from the stack, but only the uppermost value on the stack is an int.
ch...@google.com <ch...@google.com> #13
zerny@ does this look right to you?
Repro project is in /google/data/rw/teams/r8/bugs/b335663479/repro.zip and dump at /google/data/rw/teams/r8/bugs/b335663479/dump.zip.
ze...@google.com <ze...@google.com> #14
The Integer.MAX_VALUE is just to avoid computing the actual max. It should not cause an issue.
To the reporter: is this a coverage build or do you have some other plugin running that might transform the bytecode?
Co...@163.com <Co...@163.com> #15
Co...@163.com <Co...@163.com> #16
ze...@google.com <ze...@google.com> #17
In your repro project I can find an original version of the code that does not have the issue:
javap -p -v -cp ./bc/mylibrary/libs/bcprov-jdk15to18-1.77-no-sign.jar org.bouncycastle.bangsun.pqc.legacy.math.linearalgebra.GF2nONBField
<snip>
int[][] invMatrix(int[][]);
descriptor: ([[I)[[I
flags: (0x0000)
Code:
stack=4, locals=6, args_size=2
0: aload_0
1: getfield #29 // Field mDegree:I
4: aload_0
5: getfield #29 // Field mDegree:I
8: multianewarray #40, 2 // class "[[I"
12: astore_2
13: aload_1
14: astore_2
15: aload_0
16: getfield #29 // Field mDegree:I
19: aload_0
20: getfield #29 // Field mDegree:I
23: multianewarray #40, 2 // class "[[I"
<snip>
The subsequent input that is found in the dump.zip is incorrect however, and it appears that R8 is likely to blame. The code has a marker for an R8 classfile-to-classfile compilation:
#2 = String #1 // ~~R8{\"backend\":\"cf\",\"compilation-mode\":\"release\",\"has-checksums\":false,\"pg-map-id\":\"1c75180\",\"r8-mode\":\"full\",\"version\":\"8.3.37\"}
I'll need to find the intermediate R8 compilation step for this to find out what is going on. I'll post back once I find out more.
ch...@google.com <ch...@google.com> #18
Good catch. I didn't see this the first time, presumably because the build was cached so I didn't get the dump with -Dcom.android.tools.r8.dumpinputtodirectory
.
Uploaded the R8 cf-to-cf dump to /google/data/rw/teams/r8/bugs/b335663479/r8-dump.zip. Feel free to assign this back to me.
ze...@google.com <ze...@google.com> #19
I have a local repro and fix so I'll keep this one.
ap...@google.com <ap...@google.com> #20
Branch: main
commit 040b4118bf9ca73b0b04e549a9c5dced76d62540
Author: Ian Zerny <zerny@google.com>
Date: Wed Apr 24 11:08:54 2024
Always pop unused multianewarray return value
Bug:
Change-Id: I86aa3e5b3bf49a228c842bcb2e7bb5d39ef5b85b
M src/main/java/com/android/tools/r8/cf/LoadStoreHelper.java
M src/main/java/com/android/tools/r8/ir/code/Invoke.java
M src/main/java/com/android/tools/r8/ir/code/InvokeCustom.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMethod.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMultiNewArray.java
M src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayTest.java
A src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayWithOnStackValueTest.java
ap...@google.com <ap...@google.com> #21
Branch: 8.3
commit 5232c342bad0fba596e37b9933cf345a116dfb40
Author: Ian Zerny <zerny@google.com>
Date: Thu Apr 25 08:55:47 2024
Always pop unused multianewarray return value
Bug:
Change-Id: I86aa3e5b3bf49a228c842bcb2e7bb5d39ef5b85b
M src/main/java/com/android/tools/r8/cf/LoadStoreHelper.java
M src/main/java/com/android/tools/r8/ir/code/Invoke.java
M src/main/java/com/android/tools/r8/ir/code/InvokeCustom.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMethod.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMultiNewArray.java
M src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayTest.java
A src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayWithOnStackValueTest.java
ap...@google.com <ap...@google.com> #22
Branch: 8.3
commit 878cf775318a47e299c1849be5e9764d87680b4f
Author: Ian Zerny <zerny@google.com>
Date: Thu Apr 25 08:56:00 2024
Version 8.3.41
Bug:
Change-Id: I304e2807f8bdc76b9d113c8ece79a6a1de46b22e
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #23
Branch: 8.2
commit e62c035a712cf2f8ee8f581a35b56a09cda4c181
Author: Ian Zerny <zerny@google.com>
Date: Thu Apr 25 09:08:01 2024
Always pop unused multianewarray return value
Bug:
Change-Id: I86aa3e5b3bf49a228c842bcb2e7bb5d39ef5b85b
M src/main/java/com/android/tools/r8/cf/LoadStoreHelper.java
M src/main/java/com/android/tools/r8/ir/code/Invoke.java
M src/main/java/com/android/tools/r8/ir/code/InvokeCustom.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMethod.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMultiNewArray.java
M src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayTest.java
A src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayWithOnStackValueTest.java
ap...@google.com <ap...@google.com> #24
Branch: 8.2
commit edd7ff987d2f20d4a450ba0db8430735deb38edb
Author: Ian Zerny <zerny@google.com>
Date: Thu Apr 25 09:08:12 2024
Version 8.2.55
Bug:
Change-Id: I0940a055fb3cedaf2c84eb03b18d7890444097e3
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #25
Branch: 8.1
commit fc24a3b00bdf13a9852566105c2f80e384077bd1
Author: Ian Zerny <zerny@google.com>
Date: Thu Apr 25 09:36:24 2024
Version 8.1.82
Bug:
Change-Id: I04e9f17ec51f8436d7f29cc752ddc02de2f3757c
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #26
Branch: 8.1
commit dc4b99264cd8579ec534f4bece0c3de44441e2ab
Author: Ian Zerny <zerny@google.com>
Date: Thu Apr 25 09:36:11 2024
Always pop unused multianewarray return value
Bug:
Change-Id: I86aa3e5b3bf49a228c842bcb2e7bb5d39ef5b85b
M src/main/java/com/android/tools/r8/cf/LoadStoreHelper.java
M src/main/java/com/android/tools/r8/ir/code/Invoke.java
M src/main/java/com/android/tools/r8/ir/code/InvokeCustom.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMethod.java
M src/main/java/com/android/tools/r8/ir/code/InvokeMultiNewArray.java
M src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayTest.java
A src/test/java/com/android/tools/r8/cf/UnusedMultiNewArrayWithOnStackValueTest.java
ze...@google.com <ze...@google.com> #27
A fix for this has been released to the R8 branches. To use it locally you may amend your build.gradle(.kts) file with:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:<R8VERSION>")
}
}
}
where <R8VERSION>
is the appropriate version for your AGP version. For example, in AGP 8.4 use R8 version 8.4.26
or above.
For some reason the 8.4 cherry-pick is not linked in this issue.
The fix CL for 8.4 is
Co...@163.com <Co...@163.com> #28
ze...@google.com <ze...@google.com> #29
Great to hear. Thanks for filing the issue and for the great reproduction!
an...@google.com <an...@google.com> #30
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Jellyfish | 2023.3.1 Patch 1
- Android Gradle Plugin 8.4.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
int[][] invMatrix(int[][] var1) {
int[][] var10000 = new int[this.mDegree][this.mDegree];
int[][] var2 = var1;
int[][] var3 = new int[this.mDegree][this.mDegree];
int var4;
for(var4 = 0; var4 < this.mDegree; ++var4) {
var3[var4][var4] = 1;
}
for(var4 = 0; var4 < this.mDegree; ++var4) {
for(int var5 = var4; var5 < this.mDegree; ++var5) {
var2[this.mDegree - 1 - var4][var5] = var2[var4][var4];
}
}
return (int[][])null;
}
After confusion:
int[][] invMatrix(int[][] var1) {
int var2;
int var10000 = var2 = super.mDegree;
int[][] var5 = new int[new int[var10000][var10000]][var2];
int var3;
for(var3 = 0; var3 < super.mDegree; ++var3) {
var5[var3][var3] = 1;
}
int var4;
for(var2 = 0; var2 < super.mDegree; ++var2) {
for(var3 = var2; var3 < (var4 = super.mDegree); ++var3) {
var1[var4 - 1 - var2][var3] = var1[var2][var2];
}
}
return null;
}
error:Cannot constrain type: @Nullable (@Nullable (INT[])[]) for value: v9 by constraint: INT