apache / apache/arrow-nanoarrow

Update ENODATA internal sentinel to use a value found on all platforms

Open
#909 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
249
Forks
68
Avg merge
2d 16h
Merged PRs (30d)
12

Description

In https://github.com/apache/arrow-nanoarrow/pull/906 , we fixed a compile error where ENODATA wasn't defined on BSD platforms. I didn't know that ENODATA was problematic at the time, but this internal sentinel is not ideal as it's not actually part of the standard and is equivalent with ENOATTR in some places.

The internal use of this is OK with any integer value; however, there are potentially a few code paths used by advanced users of the low-level decoder that could leak this value to users, and if it's returned to an end user it should be a valid errno value. We can either pick a new sentinel or rewrite that code path to avoid using a sentinel at all or ensure that any internal sentinel doesn't get returned to end users.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the low-level decoder paths that use the ENODATA internal sentinel and review the context from pull request 906. Determine whether the sentinel can be replaced or avoided, then verify that any value exposed to end users is a valid errno on all supported platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.