[CPP]. Unaligned memory can cause a bus error on some architectures.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Start by tracing the allocator_ path that reserves memory and places C++ objects, focusing on the alignment requirements of atomic instructions on aarch64. Reproduce or validate the unaligned allocation case on that architecture; done means allocated object addresses meet the required alignment and no bus error occurs.
Written by the indexing model from the issue text.
Description
In the aarch64 architecture, atomic instructions have alignment requirements for memory addresses. If these requirements are not met, a bus error may occur.
In C++ code, most objects are created in this form:
void *buf = allocator_.alloc(sizeof(classA));
classA obj = new (buf) classA;
The allocator pre-requests a block of memory from the operating system and initializes objects within this space.This could result in some objects having an improper starting position, leading to errors when executing atomic-related instructions.
For example, some strings require a block of memory to store data. After memory is allocated for the string, the allocated pointer is located at a non-aligned address.
- Dominant language
- Java
- Stars
- 206
- Forks
- 105
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 27
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 apache/tsfile
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
c++ enhancement feature help wanted performance
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/tsfile#943 · 1 comment ·
Maintainers usually reply within 1 day
-
C feature go help wanted
Difficulty 5/5 Over a week Newbie friendliness 30/100
apache/tsfile#924 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
[Feature] Support appending to a normally closed TsFile in C++ and C APIsMay be free again @Adarsh-Me claimed this 29 days ago, and no pull request is open. OpenC c++ feature help wanted
apache/tsfile#923 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liquid-java/liquidjava#321 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenConext/OpenConext-access#1015 ·
Maintainers usually reply within 1 day
-
68000: FDBcc branch target is 2 bytes too low (uses inst_start+2 instead of the displacement word)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NationalSecurityAgency/ghidra#9702 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apache/rocketmq-dashboard#5358 ·
Maintainers usually reply within 3 days