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 2021/05/18 22:24:39 UTC

[GitHub] [arrow-rs] roee88 opened a new pull request #323: Fix undefined behavior in FFI

roee88 opened a new pull request #323:
URL: https://github.com/apache/arrow-rs/pull/323


   Fix UB in FFI due to violation of aliasing rules
   
   # Which issue does this PR close?
   
   Closes #322.
    
   # What changes are included in this PR?
   
   - Fix the issue by using raw pointers derived from the Box objects in private data rather than from moved boxes
   - Enable MIRI in CI for most tests in arrow crate 
       `test result: ok. 78 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out`
   
   Specifically, the CI is changed to run miri test against the arrow crate (only) while skipping some tests:
   1. Individual tests that are either unsupported, fail, or get stuck are ignored using `#[cfg_attr(miri, ignore)]` with a code comment that indicates why it's disabled
   2. IO tests (csv, json, ipc) are skipped in CI due to slowness and/or failures.
   
   The above was required because otherwise the CI would be stuck forever (e.g., in the `test_can_cast_types` test). This wasn't the case so far because the FFI issue failed the run. I suggest to track enabling more tests in #227.
   
   # Are there any user-facing changes?
   
   No
   


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



[GitHub] [arrow-rs] alamb merged pull request #323: Fix undefined behavior in FFI

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #323:
URL: https://github.com/apache/arrow-rs/pull/323


   


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



[GitHub] [arrow-rs] alamb commented on a change in pull request #323: Fix undefined behavior in FFI

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #323:
URL: https://github.com/apache/arrow-rs/pull/323#discussion_r637123890



##########
File path: .github/workflows/rust.yml
##########
@@ -259,8 +259,9 @@ jobs:
           export MIRIFLAGS="-Zmiri-disable-isolation"
           cargo miri setup
           cargo clean
-          # Ignore MIRI errors until we can get a clean run
-          cargo miri test || true
+          # Currently only the arrow crate is tested with miri 
+          # IO related tests and some unsupported tests are skipped
+          cargo miri test -p arrow -- --skip csv --skip ipc --skip json

Review comment:
       this is epic. Nice work @roee88 !




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



[GitHub] [arrow-rs] codecov-commenter commented on pull request #323: Fix undefined behavior in FFI

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #323:
URL: https://github.com/apache/arrow-rs/pull/323#issuecomment-843616563


   # [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#323](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ab90087) into [master](https://codecov.io/gh/apache/arrow-rs/commit/c863a2c44bffa5c092a49e07910d5e9225483193?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c863a2c) will **increase** coverage by `0.00%`.
   > The diff coverage is `92.30%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-rs/pull/323/graphs/tree.svg?width=650&height=150&src=pr&token=pq9V9qWZ1N&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #323   +/-   ##
   =======================================
     Coverage   82.52%   82.52%           
   =======================================
     Files         162      162           
     Lines       44007    44007           
   =======================================
   + Hits        36316    36317    +1     
   + Misses       7691     7690    -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [arrow/src/array/raw\_pointer.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L3Jhd19wb2ludGVyLnJz) | `100.00% <ø> (ø)` | |
   | [arrow/src/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2NvbXB1dGUva2VybmVscy9jYXN0LnJz) | `94.49% <ø> (ø)` | |
   | [arrow/src/compute/kernels/cast\_utils.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2NvbXB1dGUva2VybmVscy9jYXN0X3V0aWxzLnJz) | `92.50% <ø> (ø)` | |
   | [arrow/src/compute/kernels/length.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2NvbXB1dGUva2VybmVscy9sZW5ndGgucnM=) | `100.00% <ø> (ø)` | |
   | [arrow/src/util/bit\_chunk\_iterator.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL3V0aWwvYml0X2NodW5rX2l0ZXJhdG9yLnJz) | `96.55% <ø> (ø)` | |
   | [arrow/src/util/integration\_util.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL3V0aWwvaW50ZWdyYXRpb25fdXRpbC5ycw==) | `69.55% <ø> (ø)` | |
   | [arrow/src/ffi.rs](https://codecov.io/gh/apache/arrow-rs/pull/323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2ZmaS5ycw==) | `82.85% <92.30%> (+0.23%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c863a2c...ab90087](https://codecov.io/gh/apache/arrow-rs/pull/323?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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