-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vm] Bug fix in dedup optimization when build deferred components. #49393
Conversation
This PR fix a bug in building deferred component. I first found this error in #49372. I will explain this bug.
The cause is the dedup optimization. Actually 2.16.2's dedup. In 2.16.2, the dedup try to merge Code Object instead of instruciton. |
Thanks for the contribution! Great catch. Initial code review comments are here: https://dart-review.googlesource.com/c/sdk/+/250491 |
5764f54
to
4123acc
Compare
Closes dart-lang#49393 TEST=vm/dart{,_2}/regress_49372 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try GitOrigin-RevId: c6306f9 Change-Id: Ie766b4c41fc61835767e62e3c463878e0493f812
Closes dart-lang#49393 TEST=vm/dart{,_2}/regress_49372 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try GitOrigin-RevId: c6306f9 Change-Id: Ie766b4c41fc61835767e62e3c463878e0493f812
Closes dart-lang#49393 TEST=vm/dart{,_2}/regress_49372 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try GitOrigin-RevId: c6306f9 Change-Id: Ie766b4c41fc61835767e62e3c463878e0493f812 Signed-off-by: fzy <fangzheyuan@bytedance.com>
Closes dart-lang#49393 TEST=vm/dart{,_2}/regress_49372 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try GitOrigin-RevId: c6306f9 Change-Id: Ie766b4c41fc61835767e62e3c463878e0493f812 Signed-off-by: 方哲源 <fangzheyuan@bytedance.com>
Closes dart-lang#49393 TEST=vm/dart{,_2}/regress_49372 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try GitOrigin-RevId: c6306f9 Change-Id: Ie766b4c41fc61835767e62e3c463878e0493f812 Signed-off-by: 方哲源 <fangzheyuan@bytedance.com>
Dedup optimization
will remove duplicated Code object and keep one instance.When building deferred components, the only Code object (e.x. as callee B) maybe
exist in different loading unit from the caller A. This will cause a rellocation
bug if A->B was a relative call.
Add a flag to indicate building with deferred components.
When working with dedup and deferred components, assignUnit first and
Code object from different unit is unequal.
Issues: #49372
Signed-off-by: fangzheyuan fangzheyuan@bytedance.com