dmitry-chirkov-dremio opened a new issue, #55277: URL: https://github.com/apache/arrow/issues/55277
### Describe the bug, including details regarding any error messages, version, and platform. To reproduce: 1. Create 524,288 int32 rows. 2. Build a projector with one cast to `decimal128(10, 0)`. 3. Use `gandiva::Configuration(false)`. 4. Evaluate the batch. This crashes with SIGSEGV on macOS ARM64 with LLVM 21.1.7. With optimization enabled, it passes. Evaluation should work with either setting. `DecimalIR::CallDecimalFunction` creates two stack slots for the decimal result. These allocations are inside the record loop, so each row uses more stack. The stack is only released when the function returns. `DecimalIR::AddLarge` has the same allocation pattern. Moving the allocations to the function entry block should fix the crash. Environment: - Arrow commit: `14132604b3949ba1c25cc79fff2e1782b9efc413` - macOS ARM64, Apple M3 - LLVM 21.1.7 - RelWithDebInfo build, SIMD disabled AI tools helped with the investigation, fix, and tests. ### Component(s) C++, Gandiva -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
