You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ProjectMutilation (via GitHub)" <gi...@apache.org> on 2026/03/04 09:02:28 UTC
[I] Potential dereference of nullptr [arrow]
ProjectMutilation opened a new issue, #49445:
URL: https://github.com/apache/arrow/issues/49445
### Describe the bug, including details regarding any error messages, version, and platform.
In the function https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/bridge.cc#L2615
The pointer self->producer was unsafely dereferenced after NULL check
https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/bridge.cc#L2618
https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/bridge.cc#L2632
It is likely that the check is not necessary but it could be a cause of a segmentation fault.
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Potential dereference of nullptr [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #49445:
URL: https://github.com/apache/arrow/issues/49445#issuecomment-4165197277
Thanks @ProjectMutilation , that makes sense but I'll wait for advice for the maintainers I pinged above, since they co-authored the code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Potential dereference of nullptr [arrow]
Posted by "ProjectMutilation (via GitHub)" <gi...@apache.org>.
ProjectMutilation commented on issue #49445:
URL: https://github.com/apache/arrow/issues/49445#issuecomment-4155312736
@pitrou
I did not identify a possible route when this is possible, and therefore, I suggested that the check might be redundant, yet the code is potentially implemented in a dangerous manner. I believe that it is important to check the self->producer pointer for null values. If the pointer is null, an error message should be generated and the function should terminate.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Potential dereference of nullptr [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #49445:
URL: https://github.com/apache/arrow/issues/49445#issuecomment-4167313624
It's been too long for me to remember the logic but the check doesn't hurt. @zeroshade would know better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Potential dereference of nullptr [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #49445:
URL: https://github.com/apache/arrow/issues/49445#issuecomment-4154904800
Can you explain when that would happen? Also, what would be the desired behavior in that case?
@zeroshade @lidavidm Can you perhaps shed some light here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Potential dereference of nullptr [arrow]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #49445:
URL: https://github.com/apache/arrow/issues/49445#issuecomment-4189361140
The check definitely wouldn't hurt. Essentially the spec states that it *MUST* be non-null before any callbacks are called (see [here](https://github.com/apache/arrow/blob/d42c7ddcc233b8f372dfd7b74f51953517e16605/cpp/src/arrow/c/abi.h#L447)), so it *shouldn't* be null. But it couldn't hurt to add the null check just to properly error instead of segfault if someone messed it up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org