[Issue 17563] gc_inFinalizer should be public

2017-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17563

safety0ff.bugz  changed:

   What|Removed |Added

 CC||safety0ff.b...@gmail.com

--- Comment #3 from safety0ff.bugz  ---
An alternative solution worth considering is adding a parameter to destructors
(e.g. ~this(bool gcfinalizer=false)) and have the compiler handle
compatibility.

The advantage is that it is a better interface for future/alternate GC sweep
implementations. For example lazy/incremental sweep, concurrent sweep would
need to use thread local variables to manage the status.

--


[Issue 14336] Invalid memory access in struct destructor in std.uni

2017-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14336

safety0ff.bugz  changed:

   What|Removed |Added

 CC||safety0ff.b...@gmail.com

--- Comment #2 from safety0ff.bugz  ---
(In reply to Dmitry Olshansky from comment #1)
> 
> Do you know a way to see if we are in GC finalizer vs normal destructor?

gc_inFinalizer discussion here: https://issues.dlang.org/show_bug.cgi?id=17563

--


[Issue 14336] Invalid memory access in struct destructor in std.uni

2017-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14336

--- Comment #1 from Dmitry Olshansky  ---
(In reply to Vladimir Panteleev from comment #0)
> Created attachment 1495 [details]
> Valgrind log
> 
> Valgrind (with my Valgrind branch [1]) reports an incorrect memory access in
> std.uni.CowArray destructors (see attachment).
> 
> It looks like the following happens:
> 
> - The destructor is finalizing a heap-allocated array of
> InversionList!GcPolicy structs.
> - InversionList doesn't have a destructor, but it has a CowArray field
> ("data"). CowArray has a destructor, so one is automatically generated for
> InversionList.
> - CowArray!GcPolicy.~this calls the refCount @property.
> - The refCount @property attempts to refer to the heap-allocated (via
> GcPolicy) uint[] data field, which has already been destroyed by the GC. As
> I understand, this is an invalid memory access.
> 

Do you know a way to see if we are in GC finalizer vs normal destructor?

--


[Issue 13829] std.uni.byCodePoint for strings has length

2017-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13829

--- Comment #6 from Dmitry Olshansky  ---
https://github.com/dlang/phobos/pull/5733

--