www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - bug covering other bug

reply Mariusz =?utf-8?B?R2xpd2nFhHNraQ==?= <alienballance gmail.com> writes:
Hey,
firstly - i'm sorry that i'm not posting it directly to bugtracker but =
i highly=20
care about this issue.

So, on my Linux x64 dmd 2.53 & 2.54, while hunting another bug (i alrea=
dy=20
highly doubt it's my) - i've found this one:
<code>
private import std.stdio;

class T {
=09 property {
=09=09float[3] scale() {
=09=09=09return [1, 2, 3];
=09=09}
=09=09void scale(float[3] value) {
=09=09=09float tx =3D 1;
=09=09=09writeln(tx, " ", tx, " ", tx,
=09=09=09=09tx, " ", tx, " ", tx,
=09=09=09=09tx, " ", tx, " ", tx);
=09=09}
=09}
}

void main() {
=09auto t =3D new T;
=09t.scale =3D [1, 2, 3];
}
</code>
Compilation results in segmentation fault.
Another problem i'm searching for, is something with interfacing to C, =
pointer=20
to floats and properties and/or aliasing. NVM

Could someone point me that i'm doing something wrong, so it would give=
 me=20
motivation to fight with all this bugs more?

Because i'm already lacking of mental power when struggling with this m=
assive=20
bug'osis while writing (hopefully)  project of my live.

Awareness that i would make what i already did in C++ much faster (beca=
use of=20
bugs and libs, not a language) slowly stops being recompensated by eleg=
ance of=20
code i can write with D and highly skilled community as you are.

What's your opinion?

Sincerely,
Mariusz Gliwi=C5=84ski
Aug 26 2011
parent reply bearophile <bearophileHUGS lycos.com> writes:
Mariusz G.:

 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:
I can't reproduce the problem on 2.055head on 32 bit Windows. DMD 64 bit is relatively recent, it contains several bugs still.
 Another problem i'm searching for, is something with interfacing to C, pointer 
 to floats and properties and/or aliasing. NVM
I don't understand.
 Could someone point me that i'm doing something wrong, so it would give me 
 motivation to fight with all this bugs more?
Maybe you are doing nothing wrong.
 Because i'm already lacking of mental power when struggling with this massive 
 bug'osis while writing (hopefully)  project of my live.
Creating the project of your life with 64 bit DMD is a not so good idea. Currently DMD 32 bit is more reliable if you want to create a large project.
 What's your opinion?
I suggest to use D for less critical projects, and to help its debugging and for your life projects. Bye, bearophile
Aug 26 2011
next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Bear, you keep creating new threads when you reply to other peoples posts..
Aug 26 2011
parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sat, 27 Aug 2011 05:44:24 +0300, Andrej Mitrovic  
<andrej.mitrovich gmail.com> wrote:

 Bear, you keep creating new threads when you reply to other peoples  
 posts..
My newsreader (Opera) threads Bearophile's posts fine. Let's have a look: Marius' post has: Message-ID: <mailman.2536.1314411432.14074.digitalmars-d puremagic.com> Bearophile's post has: Message-ID: <j39lce$1rio$1 digitalmars.com> References: <mailman.2536.1314411432.14074.digitalmars-d puremagic.com> I don't see the problem. I see you're using the mailing list interface. Perhaps the gateway is mangling headers, or your mail client has some arbitrary Message ID length limit? -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Aug 26 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
I'm using gmail.
Aug 26 2011
parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sat, 27 Aug 2011 06:51:03 +0300, Andrej Mitrovic  
<andrej.mitrovich gmail.com> wrote:

 I'm using gmail.
That's not very helpful. If you post the e-mail headers for Mariusz' and bearophile's posts, as you received them, it'd probably be possible to point out whether the problem is with Gmail or the mailing list gateway. -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Aug 26 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Mariusz Gliwi=C5=84ski: http://codepad.org/9uZf3E1N
bearophile: http://codepad.org/j84TLFC8

It happens 90% of the time when bear replies.
Aug 26 2011
parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sat, 27 Aug 2011 07:08:45 +0300, Andrej Mitrovic  
<andrej.mitrovich gmail.com> wrote:

 Mariusz Gliwiński: http://codepad.org/9uZf3E1N
 bearophile: http://codepad.org/j84TLFC8

 It happens 90% of the time when bear replies.
That doesn't mean it's his fault. I think I see the problem: 1. Mariusz posts via the mailing-list interface. The original Message ID is <7480573.bRnhgVsvUV magdalene>. 2. The mailing-list interface replaces the Message ID with its own. 3. Bearophile replies via the newsgroup. His client puts the mailing list's Message ID in the References header. Thus, when you receive Bearophile's post, the message IDs don't match, because you've received Mariusz' original Message ID via the list interface. It's definitely not Bearophile's fault, his client's fault, and there is nothing Bearophile can do to prevent it. To fix it, ask Brad to do something about this (disable Message ID replacement? make the interface do a bidirectional Message ID mapping in both Message-ID and References headers?), or stop using the mailing list interface, which is obviously just a shoddy frontend to the NNTP server. -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Aug 26 2011
parent reply Brad Roberts <braddr puremagic.com> writes:
On Friday, August 26, 2011 9:29:47 PM, Vladimir Panteleev wrote:
 On Sat, 27 Aug 2011 07:08:45 +0300, Andrej Mitrovic
<andrej.mitrovich gmail.com> wrote:
 
 Mariusz Gliwiński: http://codepad.org/9uZf3E1N
 bearophile: http://codepad.org/j84TLFC8

 It happens 90% of the time when bear replies.
That doesn't mean it's his fault. I think I see the problem: 1. Mariusz posts via the mailing-list interface. The original Message ID is <7480573.bRnhgVsvUV magdalene>. 2. The mailing-list interface replaces the Message ID with its own. 3. Bearophile replies via the newsgroup. His client puts the mailing list's Message ID in the References header. Thus, when you receive Bearophile's post, the message IDs don't match, because you've received Mariusz' original Message ID via the list interface. It's definitely not Bearophile's fault, his client's fault, and there is nothing Bearophile can do to prevent it. To fix it, ask Brad to do something about
this (disable Message ID replacement? make the interface do a bidirectional Message
 ID mapping in both Message-ID and References headers?), or stop using the
mailing list interface, which is obviously
 just a shoddy frontend to the NNTP server.
I don't think the mailing list software is what's at fault. There's _tons_ of people who use it, myself included obviously. If it was a general problem with the list software (mailman, probably the most popular list management software out there), it'd be a lot more prevelant. Try again.
Aug 26 2011
parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts <braddr puremagic.com>  
wrote:

 I don't think the mailing list software is what's at fault.  There's
 _tons_ of people who use it, myself included obviously.  If it was a
 general problem with the list software (mailman, probably the most
 popular list management software out there), it'd be a lot more
 prevelant.  Try again.
Did you even read my explanation? There is no room for doubt that the mailing list is replacing message IDs. The message ID has "mailman" and "puremagic.com" in it, for crying out loud. If you're so damn confident that Mailman is absolutely perfect and cannot be flawed, have you considered that it might be a problem with how you've set it up? -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Aug 26 2011
next sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Vladimir Panteleev wrote:
 On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts <braddr puremagic.com>=
 wrote:
=20
 I don't think the mailing list software is what's at fault.  There's
 _tons_ of people who use it, myself included obviously.  If it was a
 general problem with the list software (mailman, probably the most
 popular list management software out there), it'd be a lot more
 prevelant.  Try again.
=20 Did you even read my explanation? =20 There is no room for doubt that the mailing list is replacing message IDs. The message ID has "mailman" and "puremagic.com" in it, for crying=
 out loud.
=20
 If you're so damn confident that Mailman is absolutely perfect and
 cannot be flawed, have you considered that it might be a problem with
 how you've set it up?
=20
It is so obvious that this cannot be a mailman bug that there even is an open ticket for it in the mailman tracker! https://bugs.launchpad.net/mailman/+bug/266263 Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Aug 26 2011
prev sibling parent reply Brad Roberts <braddr puremagic.com> writes:
On 8/26/2011 10:29 PM, Vladimir Panteleev wrote:
 On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts <braddr puremagic.com> wrote:
 
 I don't think the mailing list software is what's at fault.  There's
 _tons_ of people who use it, myself included obviously.  If it was a
 general problem with the list software (mailman, probably the most
 popular list management software out there), it'd be a lot more
 prevelant.  Try again.
Did you even read my explanation? There is no room for doubt that the mailing list is replacing message IDs. The message ID has "mailman" and "puremagic.com" in it, for crying out loud. If you're so damn confident that Mailman is absolutely perfect and cannot be flawed, have you considered that it might be a problem with how you've set it up?
Way to get unnecessarily emotional.. relax a little. I did read your mail. I was reacting to your over generalization that the list software is "just a shoddy frontend to the nntp server" and that people should stop using it. I never claimed it couldn't be buggy. The bug report that Jerome dug up is interesting, and also helps further my point, it's not a general problem with all messages between the nntp and smtp gateways. It seems to require cross-posting. That would match better with the frequency of occurrence of the problem, both are fairly rare. Looks like they've been discussing options for a fix, though not terribly actively. Once it's fixed, and released in an update shipped with ubuntu, I'll get it installed. There's another workaround, if the report is accurate, don't cross-post to multiple newsgroups. Not a lot of reason to do so with the D groups.
Aug 26 2011
parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sat, 27 Aug 2011 09:01:21 +0300, Brad Roberts <braddr puremagic.com>  
wrote:

 On 8/26/2011 10:29 PM, Vladimir Panteleev wrote:
 On Sat, 27 Aug 2011 07:44:16 +0300, Brad Roberts <braddr puremagic.com>  
 wrote:

 I don't think the mailing list software is what's at fault.  There's
 _tons_ of people who use it, myself included obviously.  If it was a
 general problem with the list software (mailman, probably the most
 popular list management software out there), it'd be a lot more
 prevelant.  Try again.
Did you even read my explanation? There is no room for doubt that the mailing list is replacing message IDs. The message ID has "mailman" and "puremagic.com" in it, for crying out loud. If you're so damn confident that Mailman is absolutely perfect and cannot be flawed, have you considered that it might be a problem with how you've set it up?
Way to get unnecessarily emotional.. relax a little. I did read your mail. I was reacting to your over generalization that the list software is "just a shoddy frontend to the nntp server" and that people should stop using it. I never claimed it couldn't be buggy.
I advised Andrej to stop using it if the issue was bothering him. I did not imply that everyone should stop using it. Such conversion issues are nearly unavoidable with gateways between different message formats/protocols, so I wasn't criticizing Mailman or this particular set-up, but the idea in general. "Try again." came off as arrogant dismissal to me. I may have over-reacted.
 The bug report that Jerome dug up is interesting, and also helps further  
 my point, it's not a general problem with all
 messages between the nntp and smtp gateways.  It seems to require  
 cross-posting.  That would match better with the
 frequency of occurrence of the problem, both are fairly rare.
Was your message cross-posted? Because its Message-ID is <mailman.2541.1314424921.14074.digitalmars-d puremagic.com>. List subscribers probably got a message with a different Message-ID (the real one). -- Best regards, Vladimir mailto:vladimir thecybershadow.net
Aug 26 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
You need to chill out.

If it's not bear's fault, it's not his fault. End of story. And my
apologies go to bear.

As for using NG clients, I would do that if they offered the same view
mode as gmail. There's actually a thunderbird plugin that makes the
messages appear just like in gmail, however it is painfully slow, so
I'm not using thunderbird.
Aug 27 2011
next sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 27/08/2011 15:34, Andrej Mitrovic wrote:
 As for using NG clients, I would do that if they offered the same view
 mode as gmail. There's actually a thunderbird plugin that makes the
 messages appear just like in gmail, however it is painfully slow, so
 I'm not using thunderbird.
Funny, I hate gmails interface when it comes to newsgroups! I wish it had a proper threaded interface like thunderbird... That way I could remove one of the few remaining apps I use on a daily basis. -- Robert http://octarineparrot.com/
Aug 27 2011
prev sibling parent "Marco Leise" <Marco.Leise gmx.de> writes:
Am 27.08.2011, 16:34 Uhr, schrieb Andrej Mitrovic  
<andrej.mitrovich gmail.com>:

 You need to chill out.

 If it's not bear's fault, it's not his fault. End of story. And my
 apologies go to bear.

 As for using NG clients, I would do that if they offered the same view
 mode as gmail. There's actually a thunderbird plugin that makes the
 messages appear just like in gmail, however it is painfully slow, so
 I'm not using thunderbird.
Noone probably changes the browser just for a news group, but I am happy with Opera here. The news reader is always fast and you can switch between threaded/unthreaded, some layout options and the display mode (HTML or text).
Aug 27 2011
prev sibling parent reply Mariusz =?UTF-8?B?R2xpd2nFhHNraQ==?= <alienballance gmail.com> writes:
bearophile wrote:
 Mariusz G.:
 
 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:
I can't reproduce the problem on 2.055head on 32 bit Windows. DMD 64 bit is relatively recent, it contains several bugs still.
More - http://d.puremagic.com/issues/show_bug.cgi?id=6562
 Another problem i'm searching for, is something with interfacing to C,
 pointer to floats and properties and/or aliasing. NVM
I don't understand.
I'm passing address of float variables to external C function. dmd is passing 80bit (real) though. <code> 0x0000000000d4f139 <+441>: movss -0xec(%rbp),%xmm7 0x0000000000d4f141 <+449>: movss -0xe8(%rbp),%xmm6 0x0000000000d4f149 <+457>: movss -0xe4(%rbp),%xmm5 0x0000000000d4f151 <+465>: movss -0xe0(%rbp),%xmm4 0x0000000000d4f159 <+473>: movss -0xdc(%rbp),%xmm3 0x0000000000d4f161 <+481>: movss -0xd8(%rbp),%xmm2 0x0000000000d4f169 <+489>: movss -0xd4(%rbp),%xmm1 0x0000000000d4f171 <+497>: movss -0xd0(%rbp),%xmm0 => 0x0000000000d4f179 <+505>: callq 0x10b4b04 </code> Well, actually my swig binding is casting from float* to void*, neverthless float is C float and real is 80bit, so it shouldn't be a problem? So, it's a next bug i should report, yes?
 Creating the project of your life with 64 bit DMD is a not so good idea.
 Currently DMD 32 bit is more reliable if you want to create a large
 project.
You're right, I've pushed to D too much, because it's one of projects 'features', and overall code design is driven by that. I'll just make my current D code working properly, and write C++ modules (so i could fallback to D soon). Now question, is it generally worth to refactor quite big amounts of code Thanks, Mariusz
Aug 27 2011
parent bearophile <bearophileHUGS lycos.com> writes:
Mariusz G.:

 float is C float and real is 80bit, so it shouldn't be a problem?
I think this is not a source of problems, but I suggest you to add asserts in the code to be sure the sizes of the types you are using are actually what you think they are :-)
 So, it's a next bug i should report, yes?
Of course, with a minimized test case :-) If you find bugs in DMD the best hope to not see them in future, and to not let other people see them, is to report them in Bugzilla :-)
 Now question, is it generally worth to refactor quite big amounts of code
This is a very underspecified question, so the only good answer is: sometimes it's worth it, sometimes it isn't. Bye, bearophile
Aug 27 2011