[PR #851] fix: developer_tools/malloc_dbg.c read access violation #1359

Open
opened 2026-01-29 15:19:43 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/TheAlgorithms/C/pull/851

State: closed
Merged: No


Description of Change

Added a complementary test to test_malloc_dbg.c
Removed the functions inList and editInfo from malloc_dbg.c, as well as the check of inList in malloc_dbg() that would prevent ptrToReturn from being saved in the linked list.

References

Issue #850 : [BUG] read access violation when using developer_tools/malloc_dbg

Checklist

  • Added description of change
  • Added tests and example, test must pass
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.
**Original Pull Request:** https://github.com/TheAlgorithms/C/pull/851 **State:** closed **Merged:** No --- #### Description of Change Added a complementary test to [test_malloc_dbg.c](https://github.com/TheAlgorithms/C/blob/cc241f58c253c533ac94e07151ef91a5ef7e5719/developer_tools/test_malloc_dbg.c) Removed the functions inList and editInfo from [malloc_dbg.c](https://github.com/TheAlgorithms/C/blob/cc241f58c253c533ac94e07151ef91a5ef7e5719/developer_tools/malloc_dbg.c), as well as the check of inList in [malloc_dbg()](https://github.com/TheAlgorithms/C/blob/cc241f58c253c533ac94e07151ef91a5ef7e5719/developer_tools/malloc_dbg.c#L145) that would prevent ptrToReturn from being saved in the linked list. <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Contributors guide: https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md --> #### References <!-- Add any reference to previous pull-request or issue --> Issue #850 : [BUG] read access violation when using developer_tools/malloc_dbg #### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Added description of change - [x] Added tests and example, test must pass - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license.
claunia added the pull-request label 2026-01-29 15:19:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#1359