View mode: basic / threaded / horizontal-split · Log in · Help
August 16, 2010
Re: dmd 1.063 and 2.048 release
On Mon, 16 Aug 2010 09:58:22 -0700, Walter Bright wrote:

> Michal Minich wrote:
>> On Wed, 11 Aug 2010 17:34:20 -0400, Sean Kelly wrote:
>> 
>>> Michal Minich Wrote:
>>>
>>>> On Wed, 11 Aug 2010 16:29:40 +0000, Michal Minich wrote:
>>>>
>>>>> Module constructor is not called when it is placed in imported
>>>>> module, and WinMain is used.
>>>> Are there some changes to runtime initialization, or it is a bug? (in
>>>> that case I will submit it).
>>> There were some changes and I must have missed updating rt_init().
>>> Please submit a bug.  What you'll likely see is shared static ctors
>>> being called but not thread-specific (ie. non-shared) static ctors
>>> called for the main thread.
>> 
>> bug report:
>> http://d.puremagic.com/issues/show_bug.cgi?id=4622
> 
> Fixed:
> 
> http://www.dsource.org/projects/druntime/changeset/368

the changeset only contains change to rt_term function - added call to 
_moduleTlsDtor

another bug? or miss to check-in some files?
August 16, 2010
Re: dmd 1.063 and 2.048 release
Michal Minich:
> the changeset only contains change to rt_term function - added call to 
> _moduleTlsDtor
> 
> another bug? or miss to check-in some files?

You may copy this (plus what you thinks is missing) inside the bug report.

Bye,
bearophile
August 16, 2010
Re: dmd 1.063 and 2.048 release
On Mon, 16 Aug 2010 15:21:32 -0400, bearophile wrote:

> Michal Minich:
>> the changeset only contains change to rt_term function - added call to
>> _moduleTlsDtor
>> 
>> another bug? or miss to check-in some files?
> 
> You may copy this (plus what you thinks is missing) inside the bug
> report.
> 
> Bye,
> bearophile

thank you bearophile for taking care! - another check-in was made by Sean 
after. I think that one should do it.
August 17, 2010
Re: dmd 1.063 and 2.048 release
On Mon, 16 Aug 2010 23:33:26 +0900, Jordi wrote:

> On 08/16/2010 04:11 PM, Don wrote:
>> Brad Roberts wrote:
>>> On 8/15/2010 12:54 PM, Walter Bright wrote:
>>>> Nick Sabalausky wrote:
>>>>> This may be a pain to do, but you could narrow it down from the
>>>>> other direction: recompile DMD from various trunk revisions between
>>>>> 2.046 and 2.047
>>>>> and see which actual commit created the problem.
>>>> Try mixing/matching the compiler & Phobos to see which one of those
>>>> caused the
>>>> issue.
>>>
>>> While I agree that it's worth trying a bisection -- it's generally
>>> really quick
>>> and easy to do (the compiler and libraries build rather fast -- about
>>> a minute
>>> for me). It can be a very useful technique for finding where bugs were
>>> introduced.
>>>
>>> That said, it's likely to be rather difficult for this release due to
>>> the number
>>> of fixes in the compiler that the library requires and for the periods
>>> during
>>> which the two didn't work together.
>>>
>>> Do try it.. worst case is you've wasted a little bit of time. Best
>>> case you've
>>> found the cause of the bug.
>>>
>>> Later,
>>> Brad
>>
>> The latest compiler should work with the old Phobos, except that it
>> will complain about the a&b==c bugs. That's simple to do, it just
>> involves copying the 2.048 compiler onto the 2.047 release. Knowing if
>> it is the compiler or Phobos/druntime would be an enormous help.
> 
> Found it. It took me 7 iterations of binary search across the svn
> repositories for dmd, druntime and phobos. The commit causing the issue
> is 505 in dmd. It is related to structs returning *this, which indeed i
> do in my maths structs.
> 
> Now, i don't know if the bug is in dmd or in my code, but i suspect that
> something is being treated as a reference when it shouldn't. Should i
> add an issue even if i am not sure?

Since DMD 2.021, 'this' for structs _is_ a reference.

-Lars
August 17, 2010
Re: dmd 1.063 and 2.048 release
Michal Minich <michal.minich@gmail.com> wrote:
> On Mon, 16 Aug 2010 09:58:22 -0700, Walter Bright wrote:
> 
>> Michal Minich wrote:
>>> On Wed, 11 Aug 2010 17:34:20 -0400, Sean Kelly wrote:
>>> 
>>>> Michal Minich Wrote:
>>>> 
>>>>> On Wed, 11 Aug 2010 16:29:40 +0000, Michal Minich wrote:
>>>>> 
>>>>>> Module constructor is not called when it is placed in imported
>>>>>> module, and WinMain is used.
>>>>> Are there some changes to runtime initialization, or it is a bug?
> > > > > (in
>>>>> that case I will submit it).
>>>> There were some changes and I must have missed updating rt_init().
>>>> Please submit a bug.  What you'll likely see is shared static ctors
>>>> being called but not thread-specific (ie. non-shared) static ctors
>>>> called for the main thread.
>>> 
>>> bug report:
>>> http://d.puremagic.com/issues/show_bug.cgi?id=4622
>> 
>> Fixed:
>> 
>> http://www.dsource.org/projects/druntime/changeset/368
> 
> the changeset only contains change to rt_term function - added call to
> 
> _moduleTlsDtor
> 
> another bug? or miss to check-in some files?

It's rev 369. Sorry.
August 18, 2010
Re: dmd 1.063 and 2.048 release
On 08/11/2010 02:15 AM, Walter Bright wrote:
>
> This is probably the last FreeBSD 7 release for D1. The next will be for
> FreeBSD 8!
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.063.zip
>
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.048.zip

Just tried the rpm. It won't install on 64 bit fedora because there is a 
32 bit gcc constraint in the rpm.

In my experience, dmd has always worked fine with 64 bit gcc.
August 19, 2010
Re: dmd 1.063 and 2.048 release
On 08/17/2010 02:35 AM, Walter Bright wrote:
> Jordi wrote:
>> Found it. It took me 7 iterations of binary search across the svn
>> repositories for dmd, druntime and phobos. The commit causing the
>> issue is 505 in dmd. It is related to structs returning *this, which
>> indeed i do in my maths structs.
>>
>> Now, i don't know if the bug is in dmd or in my code, but i suspect
>> that something is being treated as a reference when it shouldn't.
>> Should i add an issue even if i am not sure?
>
> Try to reduce it to the smallest possible reproducible test case, and
> then post it to bugzilla.

Instead of "peeling off" my project, which is hundreds of files and a 
lot of code, i tried to reproduce it in a small test case emulating the 
matrix operations i was suspecting of. I didn't succeed though.

I will try again when i come back from some holidays. I don't explicitly 
use "inline" anywhere though. I guess the compiler does some inlining 
anyway. Maybe if i can disable it, i can see if anything changes.

I do "return this" however in some struct methods, for example:

	Transform opMulAssign( const Transform t )
	{
		m_origin += m_basis * t.m_origin;
		m_basis *= t.m_basis;
		m_type |= t.m_type;
		return this;
	}

and others. But even if "this" is a reference like Lars pointed out, the 
method should return a copy of the struct by value, right?

Regards,

j.
August 19, 2010
Re: dmd 1.063 and 2.048 release
Jordi wrote:
> But even if "this" is a reference like Lars pointed out, the 
> method should return a copy of the struct by value, right?

Yes.
Next ›   Last »
1 2 3 4 5
Top | Discussion index | About this forum | D home