Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 11, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 Илья Ярошенко <ilyayaroshenko@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code -- |
July 14, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 Stefan Koch <uplink.coder@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uplink.coder@gmail.com --- Comment #1 from Stefan Koch <uplink.coder@gmail.com> --- How does the wrong-ness of this code manifest? -- |
July 14, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 --- Comment #2 from Илья Ярошенко <ilyayaroshenko@gmail.com> --- (In reply to Stefan Koch from comment #1) > How does the wrong-ness of this code manifest? It fails to execute with exit code -11 -- |
July 21, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 --- Comment #3 from Stefan Koch <uplink.coder@gmail.com> --- What happens is that a `memcpy` fails which seems to be done executing `data[0 .. str.length] = str` why that happens is still under investigation -- |
July 26, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 KytoDragon <kytodragon@e.mail.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kytodragon@e.mail.de --- Comment #4 from KytoDragon <kytodragon@e.mail.de> --- Aren't the ".init" values read only? The append tries to change the "data" member of the initializer, which results in an memory write error. -- |
July 31, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 --- Comment #5 from Илья Ярошенко <ilyayaroshenko@gmail.com> --- (In reply to KytoDragon from comment #4) > Aren't the ".init" values read only? The append tries to change the "data" member of the initializer, which results in an memory write error. D doesn't prohibit to call methods of right hand side values. -- |
July 31, 2020 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 Mathias LANG <pro.mathias.lang@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid CC| |pro.mathias.lang@gmail.com --- Comment #6 from Mathias LANG <pro.mathias.lang@gmail.com> --- Definitely an accepts-invalid. Trying to bind `.init` to a mutable lvalue should not be allowed. -- |
July 13, 2021 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 kinke <kinke@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|accepts-invalid |backend CC| |kinke@gmx.net --- Comment #7 from kinke <kinke@gmx.net> --- I don't see where this would be invalid - `CNB.init` is a new rvalue (analogous to `CNB()`), `append` returns it as lvalue (allowed IIRC for DotIdExpressions), and then its `data` buffer is copied to the `id` local. Works fine with LDC. -- |
December 17, 2022 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P2 -- |
April 05, 2023 [Issue 21035] wrong code when uses struct's methods of .init value | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21035 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1305@gmail.com --- Comment #8 from RazvanN <razvan.nitu1305@gmail.com> --- It seems that the inliner somehow screws up the code. Without -inline code runs successfully. -- |
Copyright © 1999-2021 by the D Language Foundation