[...]

> 
> $GHDL -r c749ent
> Allocated 000000000237D398
> 0: 2
> Free 000000000237D398
> Gnat Free 0x237d390
> *** Error in `./c749ent': free(): invalid next size (fast):
> 0x000000000237d390 ***

[...]

> gcc-4.8 -c -gnatf -gnaty3befhkmr -gnatwlu -I. -gnatec./grt.adc
> -gnat05 -gnatn -g -O grt-signals.adb
> grt-signals.adb:2407:10: warning: types for unchecked conversion have
> different sizes
> grt-signals.adb:2407:10: warning: size of "Propag_Array_Acc" is 128,
> size of "Address" is 64
> grt-signals.adb:2407:10: warning: 64 trailing bits of source will be
> ignored

I presume you instantiated unchecked_deallocation at line 2407.


> 
> So the conclusion is that
> (a) Propag ( a Propag_Array_Acc) is a fat pointer (128 bits) not just
> a System.Address

Yes.

> (b) the alignment changes from 8 bit to 16 bit when passed from Free
> to __gnat_free

Humm, not sure.  A fat pointer is a tuple of pointers, one on the bounds,
the other on the array.  With To_Address, you may just get the pointer
to the array.

> (c) the underlying C free doesn't like fat pointers?

Normally, code is generated to deal with that.

> I don't have enough of the picture to take it any further at the
> moment...

I can reproduce the bug18810 crash and I will investigate it.

Tristan.

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to