Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 21, 2016 [Issue 16708] opAssign and struct-member padding break comparison and invariants | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16708 Tomer Filiba <tomerfiliba@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry -- |
November 21, 2016 [Issue 16708] opAssign and struct-member padding break comparison and invariants | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16708 ZombineDev <petar.p.kirov@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |petar.p.kirov@gmail.com -- |
November 21, 2016 [Issue 16708] opAssign and struct-member padding break comparison and invariants | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16708 Eyal Lotem <eyal.lotem@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eyal.lotem@gmail.com --- Comment #1 from Eyal Lotem <eyal.lotem@gmail.com> --- Another way to put this is that: x = y; Uses a "fast path" (memcpy) when the type of 'x' doesn't define opAssign, or a "slow path" when the type of 'x' defines opAssign. The fast path does the correct thing and copies fields and padding bytes. The slow path does the wrong thing and calls opAssign to copy fields, but leaves padding bytes potentially uninitialized (which makes some operations *incorrect*, e.g: hashing the object). -- |
November 21, 2016 [Issue 16708] opAssign and struct-member padding break comparison and invariants | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16708 ag0aep6g@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ag0aep6g@gmail.com --- Comment #2 from ag0aep6g@gmail.com --- I'd argue that equality should not compare the padding. See issue 16216. -- |
December 17, 2022 [Issue 16708] opAssign and struct-member padding break comparison and invariants | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16708 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P2 -- |
Copyright © 1999-2021 by the D Language Foundation