Build will fail in Linux ARM architectures, Narrowing error at bdlde_base64decoder.cpp
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system, operating-systems
Research direction
Start with line 78 of bdlde_base64decoder.cpp and the bdlde::Base64Decoder::s_decoding_p declaration mentioned in the report. Reproduce the build on ARM7hf with GCC 6.5.0 and verify that the BDE build succeeds without the narrowing error.
Written by the indexing model from the issue text.
Description
Building BDE in a Raspberry Pi 3 Model B, using DietPi with GCC 6.5.0, ARM7hf, will fail since C/C++ datatype char is an implementation defined datatype, and in ARM architecture, they are unsigned chars by default.
The error stats here, at line 78 of bdlde_base64decoder.cpp
static const char decoding[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, // 20
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, // 30
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 40
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, // 50
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 60
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, // 70
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 80
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // A0
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // B0
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // C0
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // D0
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // E0
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // F0
};
changing to signed char instead of char may help, but also requires also changing the static class variable s_decoding_p from const char *const bdlde::Base64Decoder::s_decoding_p = decoding; to const signed char *const bdlde::Base64Decoder::s_decoding_p = decoding;
Another solution can be is swap from char to int
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 345
- 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 bloomberg/bde
-
ball_loggermanager: avoid repeated negative thread-logger lookupsPossibly taken @Johnny-Kao claimed this 20 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
bdls_pathutil: preserve known path length in mutable path helpersPossibly taken @Johnny-Kao claimed this 24 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Similar issues
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Extended search mode does not find escape sequences (\t, \n, \r...)Possibly taken @CyrilB1531 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
dail8859/NotepadNext#1181 ·
Maintainers usually reply within 1 day
-
A-tools P-low S-blocked task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
☢️ Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenAtomFoundation/pikiwidb#3309 ·
-
audit(c2): add_project_arguments('/experimental:c11atomics', language: ['c', 'cpp']) for MS (C2-13)Openhygiene type:refactor
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day