ni / ni/nidaqmx-python

Input buffer size value gets truncated when it exceeds the size limit

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

Nobody has claimed this yet.

Dominant language
Python
Stars
592
Forks
199
Avg merge
1d 16h
Merged PRs (30d)
10

Description

If the input buffer size is assigned a value greater than the size of int32, then the value is truncated and assigned to the buffer size.

I tried to assign a value of 800000000000 to the buffer size and the expectation was that it would raise an error. Rather the buffer was assigned with a value of 1136082944.
NI IO Trace shows that the input_buf_size is getting truncated from 800000000000 to 1136082944 before calling the DAQmx C API,
image

Contributor guide

Open the contributing guide

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 by tracing how input_buf_size is converted before the DAQmx C API call, reproducing the reported assignment of 800000000000 and the resulting truncation to 1136082944. Done means values beyond the supported int32 range raise an error instead of being silently truncated; use NI IO Trace to confirm the value passed to the API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.