apache / apache/arrow

[C++][Gandiva] Use platform pointer sizes in code generation

Open
#29,093 0 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: Gandiva Priority: Critical Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

Currently, the JIT code generation / function invocation in Gandiva uses `int64` for pointer types.

This breaks especially when indexing into pointers to pointers on platforms where the pointer size is not 64 bit wide.

To represent opaque pointers, void\* (or i8\* in LLVM) should be used where suitable.

**Reporter**: [Pablo Sichert](https://issues.apache.org/jira/browse/ARROW-13426)
#### PRs and other links:
- [GitHub Pull Request #10772](https://github.com/apache/arrow/pull/10772)

**Note**: *This issue was originally created as [ARROW-13426](https://issues.apache.org/jira/browse/ARROW-13426). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start in Gandiva's JIT code-generation and function-invocation paths, where pointer types are currently represented as int64. Trace pointer-to-pointer indexing and compare the representation with platform pointer widths. Done means opaque pointers use suitable void* or LLVM i8* forms and indexing works on non-64-bit platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.