You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/11/13 05:06:11 UTC

[GitHub] [arrow] jorgecarleitao edited a comment on pull request #8645: ARROW-10561: [Rust] Simplified Buffer's `write` and `write_bytes` and fixed undefined behavior

jorgecarleitao edited a comment on pull request #8645:
URL: https://github.com/apache/arrow/pull/8645#issuecomment-726510728


   Ok, I confirm that this error is due to a wrong pointer offset on the `set_bits_raw` and that this undefined behavior is already present in `master`:
   
   ```
   Switched to branch 'master'
   Your branch is up to date with 'upstream/master'.
      Compiling arrow v3.0.0-SNAPSHOT (/Users/jorgecarleitao/projects/arrow/rust/arrow)
       Finished bench [optimized] target(s) in 53.79s
        Running /Users/jorgecarleitao/projects/arrow/rust/target/release/deps/builder-65ece1c06584e62c
   Gnuplot not found, using plotters backend
   bench_primitive         time:   [522.83 us 523.58 us 524.34 us]                            
                           thrpt:  [7.4499 GiB/s 7.4607 GiB/s 7.4713 GiB/s]
                    change:
                           time:   [-6.7844% -4.8815% -3.0463%] (p = 0.00 < 0.05)
                           thrpt:  [+3.1420% +5.1320% +7.2782%]
                           Performance has improved.
   Found 9 outliers among 100 measurements (9.00%)
     3 (3.00%) high mild
     6 (6.00%) high severe
   
   Benchmarking bench_bool: Warming up for 3.0000 serror: process didn't exit successfully: `/Users/jorgecarleitao/projects/arrow/rust/target/release/deps/builder-65ece1c06584e62c --bench` (signal: 11, SIGSEGV: invalid memory reference)
   ```
   
   This PR removes now also removes that function altogether and replaces it by a safe counterpart. I suspect that there will be a performance regression, but I do not know enough of bit operations to be able to fix the function (and it is not clear whether we should, as per @vertexclique suggestion of using `bitvec`).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org