mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-13 05:45:07 +00:00
[BUG] read access violation when using developer_tools/malloc_dbg #99
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sebbeutler on GitHub (Aug 25, 2021).
Description
When using malloc_dbg.h to keep track of memory allocations, the program throw a
read access violation. tmp was nullptr.in filemalloc_dbg.cat line :cc241f58c2/developer_tools/malloc_dbg.c (L215)when calling malloc _dbg inside a loop.
This issue is happening because of the malloc_debug fonction.
Expected behavior
ptrToReturn being added to the linked list
Actual behavior
only the sizeof ptrToReturn is saved into the list and it throws a read access violation
Possible fix
remove the inList() condition check and the editInfo() call
Steps to reproduce
Replace developer_tools/test_malloc_dbg.c main() by :
Context
Got this bug when trying to allocate multiple blocks of memory in a loop and using malloc_dbg macros.
Additional information
No response
@github-actions[bot] commented on GitHub (Oct 5, 2021):
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@github-actions[bot] commented on GitHub (Nov 5, 2021):
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@github-actions[bot] commented on GitHub (Dec 6, 2021):
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@github-actions[bot] commented on GitHub (Dec 14, 2021):
Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!
@github-actions[bot] commented on GitHub (Jan 14, 2022):
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@github-actions[bot] commented on GitHub (Jan 22, 2022):
Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!
@github-actions[bot] commented on GitHub (Feb 22, 2022):
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@github-actions[bot] commented on GitHub (Mar 25, 2022):
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@github-actions[bot] commented on GitHub (Apr 1, 2022):
Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!