Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake create_typed_array an unsafe function #22600
Closed
Labels
Comments
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
@highfive: assign me |
|
Hey @heh9! Thanks for your interest in working on this issue. It's now assigned to you! |
bors-servo
added a commit
that referenced
this issue
Jan 7, 2019
Make create_typed_array an unsafe function <!-- Please describe your changes on the following line: --> Make `create_typed_array` function in `components/script/dom/vrframedata.rs` an unsafe function as it accepts an unsafe pointer Wrapped the function calls into an unsafe block in `components/script/dom/xrview.rs` and `components/script/dom/vrframedata.rs` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22600 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the reporter of the issue said it's fine if it compiles with no warning or errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22640) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 8, 2019
Make create_typed_array an unsafe function <!-- Please describe your changes on the following line: --> Make `create_typed_array` function in `components/script/dom/vrframedata.rs` an unsafe function as it accepts an unsafe pointer Wrapped the function calls into an unsafe block in `components/script/dom/xrview.rs` and `components/script/dom/vrframedata.rs` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22600 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the reporter of the issue said it's fine if it compiles with no warning or errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22640) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 8, 2019
Make create_typed_array an unsafe function <!-- Please describe your changes on the following line: --> Make `create_typed_array` function in `components/script/dom/vrframedata.rs` an unsafe function as it accepts an unsafe pointer Wrapped the function calls into an unsafe block in `components/script/dom/xrview.rs` and `components/script/dom/vrframedata.rs` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22600 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the reporter of the issue said it's fine if it compiles with no warning or errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22640) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 8, 2019
Make create_typed_array an unsafe function <!-- Please describe your changes on the following line: --> Make `create_typed_array` function in `components/script/dom/vrframedata.rs` an unsafe function as it accepts an unsafe pointer Wrapped the function calls into an unsafe block in `components/script/dom/xrview.rs` and `components/script/dom/vrframedata.rs` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22600 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the reporter of the issue said it's fine if it compiles with no warning or errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22640) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 8, 2019
Make create_typed_array an unsafe function <!-- Please describe your changes on the following line: --> Make `create_typed_array` function in `components/script/dom/vrframedata.rs` an unsafe function as it accepts an unsafe pointer Wrapped the function calls into an unsafe block in `components/script/dom/xrview.rs` and `components/script/dom/vrframedata.rs` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22600 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the reporter of the issue said it's fine if it compiles with no warning or errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22640) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The function
create_typed_arraytakes an unsafe pointer as an argument; that means that it's possible to pass an invalid pointer and produce a segfault outside of anunsafeblock. The function should be marked unsafe to make this clear.code:
components/script/dom/vrframedata.rsNo need for automated tests; if the changes compile without any warnings, it's good enough for a PR.