bug covering other bug
Martin Nowak
dawg at dawgfoto.de
Sat Aug 27 12:50:04 PDT 2011
On Sat, 27 Aug 2011 20:56:35 +0200, Martin Nowak <dawg at dawgfoto.de> wrote:
> On Sat, 27 Aug 2011 06:16:42 +0200, Mariusz Gliwiński
> <alienballance at gmail.com> wrote:
>
>> Hey,
>> firstly - i'm sorry that i'm not posting it directly to bugtracker but
>> i highly
>> care about this issue.
>>
>> So, on my Linux x64 dmd 2.53 & 2.54, while hunting another bug (i
>> already
>> highly doubt it's my) - i've found this one:
>> <code>
>> private import std.stdio;
>>
>> class T {
>> @property {
>> float[3] scale() {
>> return [1, 2, 3];
>> }
>> void scale(float[3] value) {
>> float tx = 1;
>> writeln(tx, " ", tx, " ", tx,
>> tx, " ", tx, " ", tx,
>> tx, " ", tx, " ", tx);
>> }
>> }
>> }
>>
>> void main() {
>> auto t = new T;
>> t.scale = [1, 2, 3];
>> }
>> </code>
>> Compilation results in segmentation fault.
>> Another problem i'm searching for, is something with interfacing to C,
>> pointer
>> to floats and properties and/or aliasing. NVM
>>
>> Could someone point me that i'm doing something wrong, so it would give
>> me
>> motivation to fight with all this bugs more?
>>
>> Because i'm already lacking of mental power when struggling with this
>> massive
>> bug'osis while writing (hopefully) project of my live.
>>
>> Awareness that i would make what i already did in C++ much faster
>> (because of
>> bugs and libs, not a language) slowly stops being recompensated by
>> elegance of
>> code i can write with D and highly skilled community as you are.
>>
>> What's your opinion?
>>
>> Sincerely,
>> Mariusz Gliwiński
>
> Thanks, I've reduced this and created a bug report.
> http://d.puremagic.com/issues/show_bug.cgi?id=6563
> It has to do with the ABI64 calling convention. The part in the backend
> is much
> newer than the 32 bit version and has a few remaining bugs. On the other
> hand I've not stumbled
> over something in the past few month.
> I'll have a look, it smells like a simple fix.
>
> martin
I've created a pull request with a fix.
https://github.com/D-Programming-Language/dmd/pull/343
Not sure though if you're using a self-compiled version of dmd.
As a workaround if you want to keep 2.054 you can restrict calls
to use less than 8 floating point parameters (i.e. split up writeln into
write and writeln).
martin
More information about the Digitalmars-d
mailing list