Issue 18110 - most of phobos should be @safe-ly useable
Summary: most of phobos should be @safe-ly useable
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: Vision
Depends on: 13607 14445 18154 18156 18159 18160 18161 18163 18164 18165 18169 18170 18171 18172 18173 18175 18176 18177 18179 18180 18183 18184 18185 23190 24391 13983 14439 18024 18155 18157 18158 18166 18167 18168 18174 18178 18181 18182 18186 18187 18444
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-21 17:01 UTC by Martin Nowak
Modified: 2024-12-01 16:31 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2017-12-21 17:01:00 UTC
Tracking issue for phobos entities that should be @safe, but currently aren't.

Let's reference per-module/package issues if someone goes on a fixing spree, but first this issue is intended to collect such issues.
Comment 1 Martin Nowak 2017-12-21 17:01:39 UTC
std.stdio.File.byLine:

Should be @safe as the internally used buffer is GC allocated, thus unexpected mutation of an escaped line is possible, but cannot cause a memory corruption.

@safe function 'foo' cannot call @system function 'std.stdio.File.byLine!(char, char).byLine'
@safe function 'foo' cannot call @system destructor 'std.stdio.File.ByLine!(char, char).ByLine.~this'
----
std.stdio.File.byLineCopy:

obviously

@safe function 'foo' cannot call @system function 'std.stdio.File.byLineCopy!(char, immutable(char)).byLineCopy'
@safe function 'foo' cannot call @system destructor 'std.stdio.File.ByLineCopy!(immutable(char), char).ByLineCopy.~this'
Comment 2 Andrei Alexandrescu 2017-12-21 18:51:34 UTC
I'd vote for this, but looks like voting has disappeared.
Comment 3 Seb 2018-01-03 04:58:23 UTC
Made a quick pass through Phobos and started to create issues for an easier overview, progress tracking and management.
The list is still quite large atm.
Comment 4 berni44 2019-12-24 12:47:29 UTC
Although important, it's more an enhancement, than a bug, isn't it?
Comment 5 dlangBugzillaToGithub 2024-12-01 16:31:11 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10273

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB