Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/13/23 10:14 PM, Steven Schveighoffer wrote: If there isn't a bug I'll file one. OMG I didn't even see that the first line of your post is the bug report! I added to it. -Steve

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/13/23 10:02 PM, Steven Schveighoffer wrote: I need to diagnose further, but most *likely* the problem is that the typeinfo being passed is incorrect (I believe it's a TypeInfo_Shared, but the function is expecting a TypeInfo_AssociativeArray) Further diagnosis is that the `TypeInfo`

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/13/23 1:06 PM, mw wrote: Does anyone know how to fix it? or any work-around? Built a debug version of dmd/druntime, the failure is here: https://github.com/dlang/dmd/blob/342a226833a0e9c7a90bbb64ae8dc35aa6d6bfdc/druntime/src/rt/aaA.d#L766 The line is: ```d immutable keysz =

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/13/23 8:02 PM, mw wrote: On Tuesday, 13 June 2023 at 22:21:10 UTC, Steven Schveighoffer wrote: As far as I can tell, this problem has been occurring for a long time. BTW, you don't need to define it in global space, just: ```d void main() {    shared aa = ["abc": "123"]; } ``` I have

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread mw via Digitalmars-d-learn
On Tuesday, 13 June 2023 at 22:21:10 UTC, Steven Schveighoffer wrote: As far as I can tell, this problem has been occurring for a long time. BTW, you don't need to define it in global space, just: ```d void main() { shared aa = ["abc": "123"]; } ``` I have to ask the old-timers on this

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/13/23 1:06 PM, mw wrote: https://issues.dlang.org/show_bug.cgi?id=20812 JR 2020-05-08 19:17:02 UTC Manjaro/Arch x86_64, dmd 2.091.1. ldc does not seem to be affected. GDC also fails. ``` shared string[string] aa; void main() {     aa = [ "abc" : "123" ]; } ``` Program received

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread mw via Digitalmars-d-learn
On Tuesday, 13 June 2023 at 17:12:41 UTC, Anonymouse wrote: On Tuesday, 13 June 2023 at 17:06:55 UTC, mw wrote: Does anyone know how to fix it? or any work-around? Thanks. I don't know if it's *correct* or not, but I think I did this at the time to work around it. ``` shared

Re: looking for work-around: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal

2023-06-13 Thread Anonymouse via Digitalmars-d-learn
On Tuesday, 13 June 2023 at 17:06:55 UTC, mw wrote: Does anyone know how to fix it? or any work-around? Thanks. I don't know if it's *correct* or not, but I think I did this at the time to work around it. ``` shared string[string] aa; void main() { auto aaTemp = [ "abc" : "123" ];