D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6562 - writeln Sigsegv
Summary: writeln Sigsegv
Status: RESOLVED DUPLICATE of issue 6563
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-26 22:40 UTC by Mariusz Gliwiński
Modified: 2011-08-27 18:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mariusz Gliwiński 2011-08-26 22:40:08 UTC
Following code crashes:
<code>
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>
<backtrace>
#0  0x00007ffff7456eb0 in mempcpy () from /lib/libc.so.6
#1  0x00007ffff7445b96 in _IO_file_xsputn () from /lib/libc.so.6
#2  0x00007ffff743bbbd in fwrite () from /lib/libc.so.6
#3  0x0000000000402e76 in _D3std5stdio4File17LockingTextWriter12__T3putTAyaZ3putMFAyaZv (this=0x7fffffffdcc0, writeme=0x000000000000000d00007fff3f800000)
    at /usr/include/d/std/stdio.d:1163
#4  0x0000000000402dbf in _D3std5range48__T3putTS3std5stdio4File17LockingTextWriterTAyaZ3putFKS3std5stdio4File17LockingTextWriterAyaZv (e=0x000000000000000d00007fff3f800000, 
    r=0x7fffffffdcc0) at /usr/include/d/std/range.d:287
#5  0x0000000000403285 in _D3std5stdio4File54__T5writeTfTAyaTfTAyaTfTfTAyaTfTAyaTfTfTAyaTfTAyaTfTaZ5writeMFfAyafAyaffAyafAyaffAyafAyafaZv (this=0x651d08, _param_15=10 '\n', 
    _param_14=1, _param_13=0x000000000043af200000000000000001, _param_12=1, _param_11=0x000000000043af200000000000000001, _param_10=1, _param_9=1, 
    _param_8=0x000000000043af200000000000000001, _param_7=1, _param_6=0x000000000043af200000000000000001, _param_5=1, _param_4=1, _param_3=0x000000000043af200000000000000001, 
    _param_2=1, _param_1=0x000000000000000d00007fff3f800000, _param_0=-nan(0x7fe2c0)) at /usr/include/d/std/stdio.d:678
#6  0x0000000000403167 in _D3std5stdio54__T7writelnTfTAyaTfTAyaTfTfTAyaTfTAyaTfTfTAyaTfTAyaTfZ7writelnFfAyafAyaffAyafAyaffAyafAyafZv (_param_14=1, 
    _param_13=0x000000000043af200000000000000001, _param_12=1, _param_11=0x000000000043af200000000000000001, _param_10=1, _param_9=1, _param_8=0x000000000043af200000000000000001, 
    _param_7=1, _param_6=0x000000000043af200000000000000001, _param_5=1, _param_4=1, _param_3=0x000000000043af200000000000000001, _param_2=1.40129846e-45, 
    _param_1=0x000000000040294d00007fff3f800000, _param_0=1) at /usr/include/d/std/stdio.d:1511
</backtrace>


Similar:
<code>
writeln(tx, tx, " ", tx, tx, " ", tx, " ", tx, tx, " ", tx, " ", tx);
</code>
<result>5.93185e-395.89226e-39 11 1 11 1 1</result>

Ps. i can't pick field 'version' 2.054 (above 2.041)
Comment 1 Mariusz Gliwiński 2011-08-27 18:20:52 UTC

*** This issue has been marked as a duplicate of issue 6563 ***