Issue 16597 - Initializing a shared hashmap segfaults
Summary: Initializing a shared hashmap segfaults
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code, pull
: 14068 (view as issue list)
Depends on:
Blocks:
 
Reported: 2016-10-05 22:10 UTC by Andrej Mitrovic
Modified: 2022-12-17 10:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2016-10-05 22:10:28 UTC
I don't understand how something this basic can segfault.

-----
shared int[int] aa;
void main ( ) { aa = [1:1, 2:2]; }
-----
Comment 1 Andrej Mitrovic 2016-10-05 22:11:18 UTC
DMD 2.071.1 on both Linux and Win32.
Comment 2 anonymous4 2016-10-06 08:28:06 UTC
AA is not thread-safe and shouldn't support shared API.
Comment 3 Dlang Bot 2019-02-19 04:00:40 UTC
@Basile-z updated dlang/dmd pull request #9366 "fix issue 16597 - deprecate `shared` as associative array storage class" fixing this issue:

- fix issue 16597 - deprecate `shared` as associative array storage class

https://github.com/dlang/dmd/pull/9366
Comment 4 basile-z 2019-03-20 22:11:42 UTC
*** Issue 14068 has been marked as a duplicate of this issue. ***