-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
mem::replace don't actually mutate the destination on Android #49282
Copy link
Copy link
Closed
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)A-codegenArea: Code generationArea: Code generationC-bugCategory: This is a bug.Category: This is a bug.O-androidOperating system: AndroidOperating system: AndroidT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)A-codegenArea: Code generationArea: Code generationC-bugCategory: This is a bug.Category: This is a bug.O-androidOperating system: AndroidOperating system: AndroidT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I have a branch of Servo which crashes when run on Android because a key use of mem::replace does not actually cause the destination to change values. When I add
println!("{:?}", self.pending_line)before and after the mem::replace, on desktop the values are updated as expected, but on Android the original value remains.When I use either of the following instead:
or
then
self.pendingis updated as expected and Servo does not crash on Android.