On Saturday, 26 December 2020 at 19:36:24 UTC, ag0aep6g wrote:
On 26.12.20 13:59, ag0aep6g wrote:
Looks like a pretty nasty bug somewhere in
std.experimental.allocator or (less likely) the GC. Further
reduced code:
[...]
Apparently, something calls deallocateAll on a Mallocator
On 26.12.20 13:59, ag0aep6g wrote:
Looks like a pretty nasty bug somewhere in std.experimental.allocator or
(less likely) the GC. Further reduced code:
[...]
Apparently, something calls deallocateAll on a Mallocator instance after
the memory of that instance has been recycled by t
On 24.12.20 17:12, Saurabh Das wrote:
This causes a segfault when run with rdmd -gx:
[...]
(Tested on DMD 2.094.2 and on https://run.dlang.io/is/p0FsOQ)
If the "GC.collect()" line is commented out, it works somehow.
Please help me understand why this is happening. This is a very reduced
ex
Try to compile in debug mode, maybe you breach some contract.
On Thursday, 24 December 2020 at 23:58:45 UTC, Elronnd wrote:
On Thursday, 24 December 2020 at 23:46:58 UTC, Elronnd wrote:
reduced version:
Further reduction: Alloc1 can just be ‘AllocatorList!(n =>
Region!Mallocator(MB))’.
Thank you for the reduced test case.
A small change to the test c
On Thursday, 24 December 2020 at 23:46:58 UTC, Elronnd wrote:
reduced version:
Further reduction: Alloc1 can just be ‘AllocatorList!(n =>
Region!Mallocator(MB))’.
On Thursday, 24 December 2020 at 16:12:31 UTC, Saurabh Das wrote:
This causes a segfault when run with rdmd -gx:
*snip*
First, here's a reduced version:
void main() {
import std.experimental.allocator: allocatorObject, expandArray;
import
std.experimental.allocator.building_blocks.al
On Thursday, 24 December 2020 at 16:12:31 UTC, Saurabh Das wrote:
This causes a segfault when run with rdmd -gx:
[...]
On my machine its a "realloc(): invalid pointer".
From what does the allocator know, that `p' is somehow an array?
This causes a segfault when run with rdmd -gx:
void main()
{
import std.experimental.allocator : allocatorObject,
expandArray;
import
std.experimental.allocator.building_blocks.allocator_list :
AllocatorList;
import std.experimental.allocator.building_blocks.region :
Region;
i