Xilinx / Xilinx/embeddedsw

HWICAP global arrays have wrong size.

Open
#333 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

In xhwicap.c:

  • l.108 series_ultra_idcodes[] is declared/defined with a size of NUM_ULTRA_SERIES_IDCODES defined to 13, while the array has a size of 14 elements.
  • l.114 series_ultra_plus_idcodes[] is declared/defined with a size of NUM_ULTRA_PLUS_SERIES_IDCODES defined to 12, while the array has a size of 30 elements.

This was flagged by compiler while attempting to compile with mb-g++ (os compiler option set to mb-g++ instead of mb-gcc). It is also trivially verifiable by mere code inspection.

This setting also flags many more errors in other drivers (currently not possible to compile a typical standalone bsp with mb-g++).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in xhwicap.c at lines 108 and 114, then inspect the NUM_ULTRA_SERIES_IDCODES and NUM_ULTRA_PLUS_SERIES_IDCODES definitions alongside both array initializers. Verify the declared sizes match the listed elements and compile with mb-g++ to confirm the reported errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.