malloc error when trying to assign the returned pointer to a struct field

rempas rempas at tutanota.com
Fri Sep 8 15:41:15 UTC 2023


On Friday, 8 September 2023 at 07:59:37 UTC, rempas wrote:
> [I do have ... I do use ldc2 and `betterC`!]

For anyone who is still following, first of all thanks! Second, I 
have bad news and good news!

The bad news is that I tested in an Linux Mint system (mine is an 
Arch Linux) and the it still doesn't work. So unless it's a bug 
in EVERY glibc on Linux, it will take me days to find it at best 
(I can feel the burnout coming!)...

The good news is that I have 
[uploaded](https://codeberg.org/rempas/nemesis) the source code 
and as I have already asked for help for that codebase in the 
past and I'll probably ask in the future, I now have a proper 
codebase to showcase when the "smallest possible example" is not 
enough!

More specifically, look at the showcases 
[Vec](https://codeberg.org/rempas/nemesis/src/branch/dev/source/erebos/structs/vector.d#L44) struct and the [template](https://codeberg.org/rempas/nemesis/src/branch/dev/source/erebos/structs/array.d#L38) that it expands on its body!

The test that fails is for a function called 
[split](https://codeberg.org/rempas/nemesis/src/branch/dev/source/erebos/algorithms/split.d#L6) and it is located [here](https://codeberg.org/rempas/nemesis/src/branch/dev/source/tests/algorithms/test_split.d#L21) (I specifically point to the line that fails inside the test).

Once again, thank you all for the support!


More information about the Digitalmars-d-learn mailing list