jmestwa-coder opened a new issue, #50078:
URL: https://github.com/apache/arrow/issues/50078

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   `AppendTimestampBatch` in `cpp/src/arrow/adapters/orc/util.cc` converts ORC 
second + nanosecond timestamps to Arrow int64 nanoseconds with a bare `seconds 
* kOneSecondNanos + nanos`. For a timestamp past ~year 2262 the multiply does 
not fit in int64, which is signed integer overflow (UB).
   
   Reducing the expression under `-fsanitize=signed-integer-overflow`:
   
   ```
   runtime error: signed integer overflow:
     10000000000 * 1000000000 cannot be represented in type 'int64_t'
   ```
   
   The conversion should detect the out-of-range case and return an error 
instead of computing the product with undefined behavior.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to