December 15, 2011
Am 14.12.2011 18:57, schrieb Walter Bright:
> On 12/14/2011 6:59 AM, Adrian wrote:
>> I have a strange crash of the new dmd 2.057 compiler.
> 
> I can't do anything without a reproducible test case.

If you want, I can sent you the whole source. Its nothing real
important, because I am playing around with D and porting some code to test.

Adrian.
December 15, 2011
On 2011-12-14 18:00, Jonathan M Davis wrote:
> On Wednesday, December 14, 2011 12:11:03 Jacob Carlborg wrote:
>> On 2011-12-14 11:10, Walter Bright wrote:
>>> On 12/14/2011 1:59 AM, Jacob Carlborg wrote:
>>>> What happened to arrays in this release:
>>>>
>>>> void foo (Object[] a) {}
>>>> class Foo {}
>>>>
>>>> void main ()
>>>> {
>>>> Foo[] b;
>>>> foo(b);
>>>> }
>>>>
>>>> The above code fails with the following message:
>>>>
>>>> main.d(54): Error: function main.foo (Object[] a) is not callable
>>>> using argument
>>>> types (Foo[])
>>>> main.d(54): Error: cannot implicitly convert expression (b) of type
>>>> Foo[] to
>>>> Object[]
>>>>
>>>> Have I missed something, I can't find this in the changelog?
>>>
>>> I don't remember if there was a bugzilla entry for it, but it's the
>>> object slicing problem. The thing is, main() expects b to be an array of
>>> Foo's. If foo() replaces one of the array elements with an Object, then
>>> b is no longer an array of Foo's, and can crash.
>>
>> I think it would be good if it's in the changelog, even if there is no
>> bugzilla entry for it.
>
> It's the first dmd bug on the list:
> http://d.puremagic.com/issues/show_bug.cgi?id=2095
>
> - Jonathan M Davis

I see, thanks. I was search for "array" on the changelog page.

-- 
/Jacob Carlborg
December 15, 2011
On Thursday, December 15, 2011 08:19:39 Jacob Carlborg wrote:
> On 2011-12-14 18:00, Jonathan M Davis wrote:
> > On Wednesday, December 14, 2011 12:11:03 Jacob Carlborg wrote:
> >> On 2011-12-14 11:10, Walter Bright wrote:
> >>> On 12/14/2011 1:59 AM, Jacob Carlborg wrote:
> >>>> What happened to arrays in this release:
> >>>> 
> >>>> void foo (Object[] a) {}
> >>>> class Foo {}
> >>>> 
> >>>> void main ()
> >>>> {
> >>>> Foo[] b;
> >>>> foo(b);
> >>>> }
> >>>> 
> >>>> The above code fails with the following message:
> >>>> 
> >>>> main.d(54): Error: function main.foo (Object[] a) is not callable
> >>>> using argument
> >>>> types (Foo[])
> >>>> main.d(54): Error: cannot implicitly convert expression (b) of
> >>>> type
> >>>> Foo[] to
> >>>> Object[]
> >>>> 
> >>>> Have I missed something, I can't find this in the changelog?
> >>> 
> >>> I don't remember if there was a bugzilla entry for it, but it's the object slicing problem. The thing is, main() expects b to be an array of Foo's. If foo() replaces one of the array elements with an Object, then b is no longer an array of Foo's, and can crash.
> >> 
> >> I think it would be good if it's in the changelog, even if there is no bugzilla entry for it.
> > 
> > It's the first dmd bug on the list: http://d.puremagic.com/issues/show_bug.cgi?id=2095
> > 
> > - Jonathan M Davis
> 
> I see, thanks. I was search for "array" on the changelog page.

The names of bug reports are frequently not particularly informative, and even if they are, they frequently don't contain the necessary information to understand the effects of fixing the bug. If you want to actually know what's really being fixed, you frequently have to actually read all of the bug reports rather than looking at their titles.

- Jonathan M Davis
December 15, 2011
Am 15.12.2011 07:50, schrieb Adrian:
> Am 14.12.2011 18:57, schrieb Walter Bright:
>> On 12/14/2011 6:59 AM, Adrian wrote:
>>> I have a strange crash of the new dmd 2.057 compiler.
>>
>> I can't do anything without a reproducible test case.
> 
> If you want, I can sent you the whole source. Its nothing real
> important, because I am playing around with D and porting some code to test.
> 
> Adrian.

I am little step forward. It has to do with the option for array bounds checking. When disabled dmd crashes, when enabled not. Therefor the debug version worked and the release not.
December 15, 2011
Am 14.12.2011 18:57, schrieb Walter Bright:
> On 12/14/2011 6:59 AM, Adrian wrote:
>> I have a strange crash of the new dmd 2.057 compiler.
> 
> I can't do anything without a reproducible test case.

I tried to reduce the problem as much as possible and found out the following:

- I have include a bug.bat which shows the commandline I used.

- for the crash to happen the project has to be compiled with the switches  -noboundscheck and -deps="bug.dep". if you omit one of them the crash wont show.

- the module btree.d has to be compiled with the project, even if it is not referenced from main.d. if it is not in the command line - no crash

- if you comment out the first writeln("Hello D-World!") in main() - no
crash

- if you comment out the other two writeln(..) in main() - no crash


hope you can reproduce it on another system - it sounds too odd to me and if it is not reproducible on another system I feel a bit crazy.

Adrian.


December 15, 2011
On 15.12.2011 12:02, Adrian wrote:
> - for the crash to happen the project has to be compiled with the
> switches  -noboundscheck and -deps="bug.dep". if you omit one of them
> the crash wont show.

sounds like this one i encountered last release already:

http://d.puremagic.com/issues/show_bug.cgi?id=6951
December 15, 2011
On 2011-12-15 08:43, Jonathan M Davis wrote:
> On Thursday, December 15, 2011 08:19:39 Jacob Carlborg wrote:
>> On 2011-12-14 18:00, Jonathan M Davis wrote:
>>> On Wednesday, December 14, 2011 12:11:03 Jacob Carlborg wrote:
>>>> On 2011-12-14 11:10, Walter Bright wrote:
>>>>> On 12/14/2011 1:59 AM, Jacob Carlborg wrote:
>>>>>> What happened to arrays in this release:
>>>>>>
>>>>>> void foo (Object[] a) {}
>>>>>> class Foo {}
>>>>>>
>>>>>> void main ()
>>>>>> {
>>>>>> Foo[] b;
>>>>>> foo(b);
>>>>>> }
>>>>>>
>>>>>> The above code fails with the following message:
>>>>>>
>>>>>> main.d(54): Error: function main.foo (Object[] a) is not callable
>>>>>> using argument
>>>>>> types (Foo[])
>>>>>> main.d(54): Error: cannot implicitly convert expression (b) of
>>>>>> type
>>>>>> Foo[] to
>>>>>> Object[]
>>>>>>
>>>>>> Have I missed something, I can't find this in the changelog?
>>>>>
>>>>> I don't remember if there was a bugzilla entry for it, but it's the
>>>>> object slicing problem. The thing is, main() expects b to be an
>>>>> array of Foo's. If foo() replaces one of the array elements with an
>>>>> Object, then b is no longer an array of Foo's, and can crash.
>>>>
>>>> I think it would be good if it's in the changelog, even if there is no
>>>> bugzilla entry for it.
>>>
>>> It's the first dmd bug on the list:
>>> http://d.puremagic.com/issues/show_bug.cgi?id=2095
>>>
>>> - Jonathan M Davis
>>
>> I see, thanks. I was search for "array" on the changelog page.
>
> The names of bug reports are frequently not particularly informative, and even
> if they are, they frequently don't contain the necessary information to
> understand the effects of fixing the bug. If you want to actually know what's
> really being fixed, you frequently have to actually read all of the bug reports
> rather than looking at their titles.
>
> - Jonathan M Davis

Yeah, I guess.

-- 
/Jacob Carlborg
December 15, 2011
On 2011-12-15 08:43, Jonathan M Davis wrote:
> The names of bug reports are frequently not particularly informative, and even
> if they are, they frequently don't contain the necessary information to
> understand the effects of fixing the bug. If you want to actually know what's
> really being fixed, you frequently have to actually read all of the bug reports
> rather than looking at their titles.
>
> - Jonathan M Davis

I wonder if we can list breaking changes in a separate sections in the changelog.

-- 
/Jacob Carlborg
December 15, 2011
Am 15.12.2011 12:31, schrieb Stephan:
> On 15.12.2011 12:02, Adrian wrote:
>> - for the crash to happen the project has to be compiled with the switches  -noboundscheck and -deps="bug.dep". if you omit one of them the crash wont show.
> 
> sounds like this one i encountered last release already:
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=6951

yes looks pretty much the same. Its total weired, because it seems to depend on code which is elsewhere.
December 15, 2011
Sounds offset-dependent. I bet if you added and removed instructions in the right place you could reduce it a lot further.

Sent from my iPhone

On Dec 15, 2011, at 3:02 AM, Adrian <adrian.remove-nospam@veith-system.de> wrote:

> Am 14.12.2011 18:57, schrieb Walter Bright:
>> On 12/14/2011 6:59 AM, Adrian wrote:
>>> I have a strange crash of the new dmd 2.057 compiler.
>> 
>> I can't do anything without a reproducible test case.
> 
> I tried to reduce the problem as much as possible and found out the following:
> 
> - I have include a bug.bat which shows the commandline I used.
> 
> - for the crash to happen the project has to be compiled with the switches  -noboundscheck and -deps="bug.dep". if you omit one of them the crash wont show.
> 
> - the module btree.d has to be compiled with the project, even if it is not referenced from main.d. if it is not in the command line - no crash
> 
> - if you comment out the first writeln("Hello D-World!") in main() - no
> crash
> 
> - if you comment out the other two writeln(..) in main() - no crash
> 
> 
> hope you can reproduce it on another system - it sounds too odd to me and if it is not reproducible on another system I feel a bit crazy.
> 
> Adrian.
> <bug.zip>