[Issue 13572] etc.c.zlib must be nothrow
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jun 22 11:37:32 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=13572
--- Comment #6 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
my understanding of @trusted (and @safe, for that matter) is that safety
promise is nullified if someone passing invalid pointer to such functions.
like, pass a slice created from arbitrary memory region to @safe function, and
it *will* segfault.
zlib stream functions holds the very same promise: until the passed pointers
and sizes are valid, zlib will neither crash nor corrupt memory outsize the
specified range. that's why i thought that it can be marked @trusted (and
actulally does so in my own code).
--
More information about the Digitalmars-d-bugs
mailing list