[C++] [Gandiva] JIT code executed over uninitialized values
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
When running Gandiva tests with Valgrind, I get the following errors:
```Java
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from TestDecimal
[ RUN ] TestDecimal.TestSimple
==12052== Conditional jump or move depends on uninitialised value(s)
==12052== at 0x41110D5: ???
==12052==
{
Memcheck:Cond
obj:*
}
==12052== Conditional jump or move depends on uninitialised value(s)
==12052== at 0x41110E8: ???
==12052==
{
Memcheck:Cond
obj:*
}
==12052== Conditional jump or move depends on uninitialised value(s)
==12052== at 0x411114B: ???
==12052==
{
Memcheck:Cond
obj:*
}
==12052== Conditional jump or move depends on uninitialised value(s)
==12052== at 0x411117B: ???
==12052==
{
Memcheck:Cond
obj:*
}
[ OK ] TestDecimal.TestSimple (16625 ms)
[ RUN ] TestDecimal.TestLiteral
[ OK ] TestDecimal.TestLiteral (3480 ms)
[ RUN ] TestDecimal.TestIfElse
[ OK ] TestDecimal.TestIfElse (2408 ms)
[ RUN ] TestDecimal.TestCompare
[ OK ] TestDecimal.TestCompare (5303 ms)
```
I think this is legitimate. Gandiva runs computations over all values, even when the bitmap indicates a null value. But decimal computations are complex and involve conditional jumps, hence the error ("Conditional jump or move depends on uninitialised value(s)").
@pravindra
**Reporter**: [Antoine Pitrou](https://issues.apache.org/jira/browse/ARROW-5272) / @pitrou
#### Related issues:
- [[C++] Reenable Valgrind on Travis-CI](https://github.com/apache/arrow/issues/21740) (is depended upon by)
#### PRs and other links:
- [GitHub Pull Request #4303](https://github.com/apache/arrow/pull/4303)
**Note**: *This issue was originally created as [ARROW-5272](https://issues.apache.org/jira/browse/ARROW-5272). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Assessment
This issue has not been assessed yet.