www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11594] New: synchronized causing segfault instead of Error.


           Summary: synchronized causing segfault instead of Error.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: shammah.chancellor gmail.com

--- Comment #0 from Shammah Chancellor <shammah.chancellor gmail.com>
2013-11-24 11:42:32 PST ---
I'm not sure why this segfaults, since core.sync.mutex has an in contract to
check for null?  I am compiling in debug mode.

import std.stdio;

private Object mut;// = new Object();                                           

void lockedFunction()
  synchronized(mut)  //I asume this makes does auto mutex = new Mutex(mut) and
then mutex.lock()?
    } //mutex.unlock();?

   /* Also results in segfault:
  auto mutex = new Mutex(mut);

void main()

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