mfunyu / malloc

Find out the workings behind optimum memory management and recode it, as well as free and realloc.
2 stars 0 forks source link

[segfault] fish #61

Open mfunyu opened 5 months ago

mfunyu commented 5 months ago

fish crush sometimes

mfunyu commented 5 months ago
$> MallocShowHeap=1 LD_PRELOAD=./libft_malloc.so fish 2> log  
Welcome to fish, the friendly interactive shell
mfunyu@z3r9p5 ~/s/4/malloc (fix_review)> 
mfunyu@z3r9p5 ~/s/4/malloc (fix_review)> 
mfunyu@z3r9p5 ~/s/4/malloc (fix_review)> 
[1]    487836 segmentation fault (core dumped)  MallocShowHeap=1 LD_PRELOAD=./libft_malloc.so fish 2> log
mfunyu commented 5 months ago
==================++==========================+
 0x7efcf322cb60   ||                          | 
------------------++--------------------------+
 0x7efcf322cb68   ||       48 (     0x30) |A|P| size
------------------++--------------------------+
 0x7efcf322cb70   || f                        | mem
 0x7efcf322cb78   ||                          | 
                  || (( abbriviated ))        | 
==================++==========================+
< FreeList >
----------+------------------+------------------+------------------+
 [0] (32) |-> 0x7efcf322b920 (32)|-> 0x7efcf322ae60 (32)| (2)
----------+------------------+------------------+------------------+
 [1] (48) |-> 0x7efcf322cb60 (48)|

non-free block is in freelist somehow

mfunyu commented 5 months ago

fish is multi-threaded. does not work with my malloc