[Issue 12507] New: SysTime.init.toString should not segfault
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 2 20:26:41 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12507
Summary: SysTime.init.toString should not segfault
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-04-03 06:26:34 EEST ---
SysTime.init.toString unconditionally dereferences the timezone field
(indirectly - it calls adjTime which does so), which will be null for
SysTime.init.
This needlessly complicates debugging - writeln(t) will segfault if t has not
been set.
Question: what should be returned? null? "null" the string literal (like what
printf does for null pointers)? The time sans timezone ("0001-Jan-01
00:00:00")?
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list