-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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.
Description
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:
self.pending_line = Line::new(self.floats.writing_mode, &self.minimum_metrics);
or
let mut new_line = Line::new(self.floats.writing_mode, &self.minimum_metrics);
mem::swap(&mut self.pending_line, &mut new_line);
then self.pending
is updated as expected and Servo does not crash on Android.
hanna-kruppe, kennytm and Eijebong
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.