Bug 5407 – X86_64: Segfault on AA Foreach

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2011-01-03T21:39:00Z
Last change time
2011-01-04T05:15:18Z
Keywords
patch
Assigned to
braddr
Creator
ibuclaw

Comments

Comment #0 by ibuclaw — 2011-01-03T21:39:58Z
The aligntsize() implementations in aaA.d and object_.d differ, causing a segfault to occur during runtime. Relevant ticket against GDC here: https://bitbucket.org/goshawk/gdc/issue/133/segfault-on-aa-foreach And fix has already been committed, can you please sync this into to druntime? https://bitbucket.org/goshawk/gdc/changeset/aba6c8857d64 Regards
Comment #1 by braddr — 2011-01-03T21:48:35Z
Hrm.. why are there two implementations of the function in the first place? I'll take this bug, but what I'd prefer to see is loosing the one in aaA.d and making the one in object.di/object_.d correct. You didn't happen to try that, did you?
Comment #2 by ibuclaw — 2011-01-03T21:58:07Z
The one on object.d is a member of struct AssociativeArray(Key, Value), the other is an internal helper function.
Comment #3 by nfxjfg — 2011-01-03T22:05:09Z
By the way, I have already demonstrated with a compiler/runtime patch, that you can have an associative array ABI that works on all architectures and doesn't need that messy alignment stuff (how many bugs did that generate in the past, present and future?). Enjoy your bugs, I guess.
Comment #4 by braddr — 2011-01-03T22:53:19Z
Changes applied in r473. Thanks Iain.
Comment #5 by ibuclaw — 2011-01-04T05:15:18Z
(In reply to comment #3) > By the way, I have already demonstrated with a compiler/runtime patch, that you > can have an associative array ABI that works on all architectures and doesn't > need that messy alignment stuff (how many bugs did that generate in the past, > present and future?). > Would you happen to know where you demonstrated this? :) All I can find ABI-wise on AA's is http://d.puremagic.com/issues/show_bug.cgi?id=802