http://d.puremagic.com/issues/show_bug.cgi?id=4199


Shin Fujishiro <rsi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|Other                       |All
            Summary|D2 core.sys.posix.setjmp    |D2 core.sys.posix.*: array
                   |segfaults                   |parameters of C functions
                   |                            |must be ref
         OS/Version|FreeBSD                     |All


--- Comment #1 from Shin Fujishiro <rsi...@gmail.com> 2010-05-17 06:17:01 PDT 
---
Hmm, the problem seems more generic.  More functions in core.sys.posix.* take
array parameters, and these are not ref-ed.  A good example is pipe():
--------------------
import std.stdio;
import core.sys.posix.unistd; // int pipe(int[2]);
void main() {
    int[2] pp;
    pipe(pp);
    writeln("Hello, world."); // not reached!
}
--------------------

The pipe() must be declared like: int pipe(ref int[2]).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to