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

Ticket #679 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

Stdout cannot print large numbers of objects using varargs

Reported by: dhasenan Assigned to: kris
Priority: major Milestone: 0.99.3
Component: IO Version: 0.99.2 Don
Keywords: Cc:

Description

Stdout(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);

The above line compiles, but it segfaults at runtime. Looking at the source, tango/io/Print.d:143, there are default format strings for anywhere from 1 to 12 objects, but none for greater than twelve.

To minimize heap activity, I suggest keeping the current system with premade format strings, then, if there are too many arguments, use a recursive method to assemble a format string. It will be relatively rare to have that many arguments, so this method will rarely be called.

Change History

10/11/07 12:51:11 changed by kris

  • status changed from new to assigned.
  • milestone set to 0.99.3.

hrm, it should assert instead, but yeah .... Stdout.format() also has a limitation, but it's something like 64 arguments instead.

Thanks; I'll look into it.

11/02/07 17:43:53 changed by kris

  • milestone changed from 0.99.3 to 0.99.4.

11/03/07 00:05:43 changed by kris

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

(In [2744]) fixes #679 :: Stdout cannot print large numbers of objects using varargs

(thanks to dhasenan)

11/03/07 00:08:49 changed by kris

  • milestone changed from 0.99.4 to 0.99.3.