Incorrect const in pgm_read_ptr
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- embedded-iot
Research direction
Open cores/arduino/avr/pgmspace.h at the linked line and inspect the pgm_read_ptr macro and its callers. Verify the pointer-qualification behavior and compile the affected uses; the issue is done when the cast matches the intended read-only pointer semantics without breaking those uses.
Written by the indexing model from the issue text.
Description
There seems to be bug in macro pgm_read_ptr macro in the pgmspace.h header.
The cast to const void ** is incorrect, because it casts it to "a pointer to a pointer to a read-only object of any type".
I believe that the correct type would be void *const *, "a pointer to a read-only pointer to an object of any type". The pointer itself is in progmem, and therefore is read-only, but the pointee is not necessarily read-only, as it could be in static memory.
Discovered here: https://github.com/tttapa/Control-Surface/issues/64
- Dominant language
- HTML
- Stars
- 91
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
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 arduino/ArduinoCore-sam
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
arduino/ArduinoCore-sam#129 ·
-
Type: Bug USB: CDC serial
Difficulty 4/5 3-5 days Newbie friendliness 52/100
arduino/ArduinoCore-sam#153 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arduino/ArduinoCore-sam#151 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arduino/ArduinoCore-sam#147 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
arduino/ArduinoCore-sam#146 ·
All issues in arduino/ArduinoCore-sam
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ARM-software/CMSIS-DSP#354 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ZigEmbeddedGroup/microzig#1086 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jim-wyatt/two-computers-one-board#96 ·
Maintainers usually reply within 1 day
-
soc: espressif: boot hangs when the console is not a UART (ESP_CONSOLE_UART_NUM = -1)Possibly taken @sylvioalves claimed this 1 day ago. Openplatform: ESP32 priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zephyrproject-rtos/zephyr#121795 · 1 assignee ·
Maintainers usually reply within 2 days