Use `malloc` function attribute
Maintainers usually reply within 4 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
The payload names no source files. Start by finding allocation functions in the C sources whose memory is released by a matching deallocation function, then read the GCC malloc attribute documentation linked in the issue. Done when the attribute is applied to those allocators and the project builds with warnings enabled.
Written by the indexing model from the issue text.
Description
For a while now gcc (and likely clang) has malloc (deallocator, ptr-index) (see the docs) which allows us to annotate the deallocation function which should be used.
Effectively allowing the compiler to warn on issues like https://github.com/kmod-project/kmod/pull/467... Mind you, I haven't checked if it will help with that specific issue but the principle idea remains.
- Dominant language
- C
- Stars
- 116
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kmod-project/kmod
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kmod-project/kmod#492 ·
Maintainers usually reply within 4 days
-
good first issue
Difficulty 3/5 1-2 days Newbie friendliness 35/100
kmod-project/kmod#484 · 1 reaction ·
Maintainers usually reply within 4 days
-
good first issue
Difficulty 4/5 3-5 days Newbie friendliness 35/100
kmod-project/kmod#483 ·
Maintainers usually reply within 4 days
-
Various 34.x backport nominationsPossibly taken @lucasdemarchi claimed this 5 days ago. Openfor-lucas
kmod-project/kmod#480 · 2 comments · 1 assignee ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
kmod-project/kmod#476 · 1 comment ·
Maintainers usually reply within 4 days
All issues in kmod-project/kmod
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PecanProject/sipnet#435 · 1 comment ·
Maintainers usually reply within 2 days
-
SDL_GPU Vulkan: wrong screen orientation on OpenHarmony (preTransform set without pre-rotation)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
libsdl-org/SDL#16670 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
要トリアージ 辞書
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainers usually reply within 1 day
-
kind/bug priority/medium qa_automation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yugabyte/yugabyte-db#37324 ·
Maintainers usually reply within 1 day