www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19802] New: Possible regression with dustmite

https://issues.dlang.org/show_bug.cgi?id=19802

          Issue ID: 19802
           Summary: Possible regression with dustmite
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: me francescomecca.eu

I am getting a sigsegv running dustmite compiled with dmd ~master:
```
(gdb) r --force ../../druntime/src/ 'grep -nR HAVE_FORK' 
```
```
[...]
Loading ../../druntime/src/rt/util/typeinfo.d
Loading ../../druntime/src/test_runner.d
None =>
Program received signal SIGSEGV, Segmentation fault.
_D4core6atomic__T10atomicLoadVEQBdQBb11MemoryOrderi3TkZQBmFNaNbNiNfKOxkZk
(val=<error reading variable>)                               
    at ../druntime/import/core/atomic.d:1130
1130                        lock; // lock always needed to make this op atomic  
(gdb) bt

(val=<error reading variable>)                           
    at ../druntime/import/core/atomic.d:1130

std/stdio.d:468                                                    

_D3std7process10spawnShellFNeMAxaSQBg5stdio4FileQpQrMxHAyaAyaEQCiQCh6ConfigMQBuMQzZCQDeQDd3Pid
(             
    shellPath=..., workDir=..., config=<incomplete type>, env=..., stderr=...,
stdout=..., stdin=..., command=...)                     
    at std/process.d:1307

(__capture=0x7fffdef44680) at ../../phobos/std/process.d:1288     

_D8dustmite4testFSQq9ReductionZ12__dgliteral7MFNaNiNfZb
(__capture=0x7fffdef44680) at dustmite.d:1535        

(__capture=0x7fffdef44680,                                   
    fallback=1730765656476055832606875017561728) at dustmite.d:1512

_D8dustmite4testFSQq9ReductionZ12__dgliteral8MFNaNiNfZb
(__capture=0x7fffdef44680) at dustmite.d:1535        

(__capture=0x7fffdef44680,                                 
    fallback=1730765656475391749820221473703552) at dustmite.d:1408

_D8dustmite4testFSQq9ReductionZ12__dgliteral9MFNaNiNfZb
(__capture=0x7fffdef44680) at dustmite.d:1535        

(__capture=0x7fffdef44680,                                 
    fallback=1730765656474727667033567929845376) at dustmite.d:1377

dustmite.d:1535                                          

(gdb) l
1125                    asm pure nothrow  nogc  trusted
1126                    {
1127                        mov EDX, 0;
1128                        mov EAX, 0;
1129                        mov RCX, val;
1130                        lock; // lock always needed to make this op atomic
1131                        cmpxchg [RCX], EDX;
1132                    }
1133                }
1134                else
(gdb) 
```

--
Apr 11 2019