[Issue 9449] Segmentation fault in main()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 22 09:44:55 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9449



--- Comment #12 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-04-22 09:44:52 PDT ---
(In reply to comment #10)
> > I see no difference between length dynamic array property and your "lower 64
> > bits of value" (also between ptr and "higher 64 bits of value"). 
> 
> because value is not an array. As I said before, void[] is just used because
> conveniently void[].sizeof == 16 (128 bits) on x64 (the check for x64 is done
> inside e2ir.c)

Value is actually accepted as an array due to passing conversions and unusual
usage inside memset function is no excuse for changing ABI interpretation.
Clearly, anyone can pass many different things through some inappropriate
parameter but it does not mean that each time callee would adjust passing
convention for different types. I don't see point in this dispute further . I
argue that value is technically accepted as dynamic array and you argue that it
is treated as 128 bit element. These points don't contradict and however
arguments are called (lower value or length property) does change the picture -
there is no correspondence between what is passed and what is received.

> I'm currently re-implementing memset.d and updating the compiler to interact
> with the new functions. This should hopefully fix this bug and maybe 9969 also,
> if there isn't a nasty backend bug hiding behind it all.

I doubt that it is possible without dmd hacking but good luck.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list