Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #2034 (closed defect: fixed)

Opened 13 years ago

Last modified 13 years ago

rt_finalize is called to finish array of structs (SEGFAULT)

Reported by: jdavidls Assigned to: community
Priority: major Milestone: 1.0
Component: Runtime Version: trunk
Keywords: GC unstable segfault Cc:

Description

TANGO - LDC - LINUX64

Only in some cases under undefined behavior, the Garbage collector try to finish an array of structs as objects at the finish of program, causing segmentation fault when accessing to ClassInfo? pointer. If a first null size_t property prepend the struct definition, the bug can be fixed. I observed the problem not occurs when the size of the struct is greater than 48 bytes, and if try to reproduce the bug with another struct implementation, my app only crashes in some compilations..

I can't trace the GC behavior, We see GC is unstable for long lifetime applications and think tango should give option to compile without GC. I do not know if the problem persists in other compilation platforms.

Attachments

Carpeta sin título.tar.bz2 (2.5 kB) - added by jdavidls on 02/08/11 11:37:24.
bug here!!
Rex.d (4.1 kB) - added by jdavidls on 02/08/11 11:54:59.
test.d (3.0 kB) - added by jdavidls on 02/08/11 11:55:13.
console output (2.7 kB) - added by jdavidls on 02/08/11 11:56:03.

Change History

02/08/11 11:37:24 changed by jdavidls

  • attachment Carpeta sin título.tar.bz2 added.

bug here!!

02/08/11 11:54:59 changed by jdavidls

  • attachment Rex.d added.

02/08/11 11:55:13 changed by jdavidls

  • attachment test.d added.

02/08/11 11:56:03 changed by jdavidls

  • attachment console output added.

02/09/11 08:50:06 changed by jdavidls

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in the new gdgc implementation! :)