free(): double free detected in tcache 2

workman workman at gmail.com
Thu Aug 26 06:28:26 UTC 2021


On Wednesday, 25 August 2021 at 09:18:56 UTC, Johan wrote:
>
> Then it's the same bug as I mentioned.
> If you have the option to try with other linkers, then please 
> try. It should work with ld.gold.
>
> -Johan


Thanks for explain, I try use gold before and they are create a 
lot link error like this:

```sh
/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o:function _start: error: undefined reference to '__libc_csu_fini'
/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o:function _start: error: undefined reference to '__libc_csu_init'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8readImplFNeMAxaMPxamZAv: error: undefined reference 
to 'fstat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file10existsImplFNbNiNePxaZb: error: undefined reference 
to 'lstat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file12mkdirRecurseFNfMAxaZv: error: undefined reference to 
'lstat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file__T6existsTAxaZQmFNbNiNfQnZb: error: undefined 
reference to 'lstat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8DirEntry6__ctorMFNcNfAyaZSQBkQBjQBh: error: undefined 
reference to 'lstat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8DirEntry5isDirMFNdNfZb: error: undefined reference to 
'stat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8DirEntry22_ensureStatOrLStatDoneMFNeZv: error: 
undefined reference to 'stat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8DirEntry6isFileMFNdNfZb: error: undefined reference 
to 'stat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8DirEntry15_ensureStatDoneMFNeZv: error: undefined 
reference to 'stat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8copyImplFNeMAxaMQeMPxaMQeEQBk8typecons__T4FlagVAyaa18_707265736572766541747472696275746573ZQByZv: error: undefined reference to 'fstat64'
/usr/bin/../lib/libphobos2-ldc.a(file.o):file.d:function 
_D3std4file8copyImplFNeMAxaMQeMPxaMQeEQBk8typecons__T4FlagVAyaa18_707265736572766541747472696275746573ZQByZv: error: undefined reference to 'fstat64'
/usr/bin/../lib/libphobos2-ldc.a(curl.o):curl.d:function 
_D3std3net4curl7CurlAPI7loadAPIFZPv: error: undefined reference 
to 'atexit'
/usr/bin/../lib/libphobos2-ldc.a(process.o):process.d:function 
_D3std7process17spawnProcessPosixFNeMAxAaSQBo5stdio4FileQpQrMxHAyaAyaSQCqQCp6ConfigMAxaZCQDjQDi3Pid: error: undefined reference to 'fstat64'
/usr/bin/../lib/libdruntime-ldc.a(gc.o):gc.d:function 
_D4core8internal2gc4impl12conservativeQw14ConservativeGC6__ctorMFZCQCnQClQCfQCfQCdQCoQBt: error: undefined reference to 'pthread_atfork'
/usr/bin/../lib/libdruntime-ldc.a(gc.o):gc.d:function 
_D4core8internal2gc4impl12conservativeQw3Gcx10initializeMFZv: 
error: undefined reference to 'pthread_atfork'
```


LLD work great if I use LDC betterC and LTO.




More information about the digitalmars-d-ldc mailing list