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

[crush] accessing invalid index #55

Closed mfunyu closed 10 months ago

mfunyu commented 10 months ago
[ malloc] by _Znwm        : malloc(64) = 0x7f31ec1af9a0
[ malloc] by _Znwm        : malloc(132) = 0x7f31ec1af9f0
[ malloc] by _Znwm        : malloc(64) = 0x7f31ec1afa80
[ malloc] by _Znwm        : malloc(132) = 0x7f31ec1afad0
[   free]                 : free(0x7f31ec1af050)
index: 7
[   free]                 : free(0x7f31ec1aef30)
index: 7
[   free]                 : free(0x7f31ec1aee10)
index: 7
[   free]                 : free(0x7f31ec1aecf0)
index: 7
[   free]                 : free(0x7f31ec1aebd0)
index: 7
[   free]                 : free(0x7f31ec1aeab0)
index: 7
[   free]                 : free(0x7f31ec1ae990)
index: 7
[   free]                 : free(0x7f31ec1ae870)
index: 7
[   free]                 : free(0x7f31ec1ae750)
index: 7
[   free]                 : free(0x7f31ec1ae630)
index: 7
[   free]                 : free(0x7f31ec1ae510)
index: 7
[   free]                 : free(0x7f31ec1ae3f0)
index: 7
[   free]                 : free(0x7f31ec1aefc0)
index: 25
[   free]                 : free(0x7f31ec1aeea0)
index: 43
[   free]                 : free(0x7f31ec1aed80)
index: 61
[   free]                 : free(0x7f31ec1aec60)
index: 79
[   free]                 : free(0x7f31ec1aeb40)
index: 97
[   free]                 : free(0x7f31ec1aea20)
index: 115
[   free]                 : free(0x7f31ec1ae900)
index: 133
[   free]                 : free(0x7f31ec1ae7e0)
index: 151
[1]    330137 segmentation fault (core dumped)  LD_PRELOAD=./libft_malloc.so MallocDebug=1 clang