Thread overview
[Issue 1243] New: inout args can point to null
May 22, 2007
d-bugmail
Jun 29, 2007
d-bugmail
[Issue 1243] (D1 only) inout args can point to null
Feb 17, 2013
Denis Shelomovskij
May 22, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1243

           Summary: inout args can point to null
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: shro8822@uidaho.edu


this seg-v's:

void main()
{
        char* t = null;
        fn(*t);
}

void fn(inout char j)
{
        j = 5;
}

I just spent about 10 minuets trying to figure out why something a lot like that was failing.

In non release mode, DMD should put in an assert(_ !is null) when a pointer is de referenced and used as an out or inout arg.


-- 

June 29, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1243


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement




-- 

February 17, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=1243


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg@gmail.com
           Platform|x86                         |All
            Version|1.014                       |D1
            Summary|inout args can point to     |(D1 only) inout args can
                   |null                        |point to null
         OS/Version|Windows                     |All


--- Comment #1 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-02-17 11:08:56 MSK ---
This is D1 only. For D2 see Issue 7629.

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