Understanding SIGSEGV issues
Russel Winder
russel at winder.org.uk
Thu Jan 3 08:35:17 UTC 2019
On Thu, 2019-01-03 at 07:52 +0000, Nicholas Wilson via Digitalmars-d-learn
wrote:
> On Thursday, 3 January 2019 at 06:25:46 UTC, Russel Winder wrote:
> > So I have a D program that used to work. I come back to it,
> > recompile it, and:
> >
> > [...]
> > __GI___libc_free (mem=0xa) at malloc.c:3093
>
> You've tried to free a pointer that, while not null, was derived
> from a pointer that was, i.e. an offset to a field of a struct.
>
> A backtrace would help a lot, otherwise it really is just
> guessing.
Sorry about that, fairly obvious that the backtrace is needed in hindsight. :-
)
#0 __GI___libc_free (mem=0xa) at malloc.c:3093
#1 0x000055555558f174 in dvb_file_free (dvb_file=0x5555555a1320) at dvb_file.d:282
#2 0x000055555558edcc in types.File_Ptr.~this() (this=...) at types.d:83
#3 0x0000555555574809 in channels.TransmitterData.__fieldDtor() (this=<error reading variable: Cannot access memory at address 0xa>) at channels.d:144
#4 0x000055555556aeda in channels.TransmitterData.__aggrDtor() (this=...) at channels.d:144
#5 0x000055555556ab53 in D main (args=...) at main.d:33
Which indicates that the destructor is being called before the instance has
been constructed. Which is a real WTF.
--
Russel.
===========================================
Dr Russel Winder t: +44 20 7585 2200
41 Buckmaster Road m: +44 7770 465 077
London SW11 1EN, UK w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20190103/44b6727a/attachment.sig>
More information about the Digitalmars-d-learn
mailing list