Bug 17481 – [REG 2.069.0] synchronized: Access Violation with dmd -O on win32

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2017-06-08T17:39:00Z
Last change time
2017-08-07T13:17:16Z
Assigned to
nobody
Creator
gassa

Comments

Comment #0 by gassa — 2017-06-08T17:39:01Z
Code: ----- class Obj{ synchronized void trigger(){ new ubyte[1]; } } void main(){ auto k = new shared Obj; k.trigger; } ----- When compiled on win32 with just "dmd", it runs fine. When compiled with "dmd -O -g", it gives the following error at runtime: ----- object.Error@(0): Access Violation ---------------- 0x00000065 0x00402C6B in _d_newarrayU 0x004023EF in _d_newarrayT 0x00402A7F in scope void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() 0x00402980 in _d_run_main 0x00402288 in main at C:\programs\stuff\dlang\synchronized-memory-bug\a.d(8) 0x76D5336A in BaseThreadInitThunk 0x77369902 in RtlInitializeExceptionChain 0x773698D5 in RtlInitializeExceptionChain ----- Win64 is OK. Win32 with dmd 2.068.2 or earlier is OK. Win32 with dmd 2.069.0 or later gives the error above. Original thread at D.learn: https://forum.dlang.org/post/[email protected]
Comment #1 by bugzilla — 2017-07-04T03:39:34Z
Comment #2 by github-bugzilla — 2017-07-09T22:28:27Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d728c0f9ba8f762682eced7da06f8123ed4d7f71 fix Issue 17481 - [REG 2.069.0] synchronized: Access Violation with dmd -O on win32 https://github.com/dlang/dmd/commit/5fa367d499fd688d02e53afc9c2ceef31fb67619 Merge pull request #6965 from WalterBright/fix17481 fix Issue 17481 - [REG 2.069.0] synchronized: Access Violation with d… merged-on-behalf-of: Martin Nowak <[email protected]>
Comment #3 by github-bugzilla — 2017-07-10T11:10:56Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d728c0f9ba8f762682eced7da06f8123ed4d7f71 fix Issue 17481 - [REG 2.069.0] synchronized: Access Violation with dmd -O on win32 https://github.com/dlang/dmd/commit/5fa367d499fd688d02e53afc9c2ceef31fb67619 Merge pull request #6965 from WalterBright/fix17481
Comment #4 by github-bugzilla — 2017-08-07T13:17:16Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d728c0f9ba8f762682eced7da06f8123ed4d7f71 fix Issue 17481 - [REG 2.069.0] synchronized: Access Violation with dmd -O on win32 https://github.com/dlang/dmd/commit/5fa367d499fd688d02e53afc9c2ceef31fb67619 Merge pull request #6965 from WalterBright/fix17481