Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit maximum alignment in #[repr(align)] to 4K #70193

Closed
wants to merge 2 commits into from

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Mar 20, 2020

Let's try this on crater to see the impact.

cc #70022 #70143 #70144

@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 20, 2020
@Amanieu
Copy link
Member Author

Amanieu commented Mar 20, 2020

@bors try

@bors
Copy link
Contributor

bors commented Mar 20, 2020

⌛ Trying commit 290ac8d with merge 140461fb7e517404cf26f5c951fd8629cc232828...

Ok(*literal as u32)
} else {
Err("larger than 2^29")
Err("larger than 4096")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we land this, then it would be good to mention what this magic number is about

Ok(*literal as u32)
} else {
Err("larger than 2^29")
Err("larger than 4096")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, let's add a regression test at (4096 + 1).next_power_of_two()

@@ -67,9 +67,9 @@ struct AlignContainsPacked4C {

// The align limit was originally smaller (2^15).
// Check that it works with big numbers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Irrelevant for crater run but this comment is now wrong.

@bors
Copy link
Contributor

bors commented Mar 20, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2020
@Amanieu
Copy link
Member Author

Amanieu commented Mar 20, 2020

@bors retry

@bors
Copy link
Contributor

bors commented Mar 20, 2020

⌛ Trying commit 290ac8d with merge e236cb20f9a6d9a97f7e915fabdff9ef9fdcafc6...

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-20T16:56:06.8576901Z ========================== Starting Command Output ===========================
2020-03-20T16:56:06.8580906Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/ed429fc9-5083-4858-bbac-37d2add72f5f.sh
2020-03-20T16:56:06.8581271Z 
2020-03-20T16:56:06.8584651Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-20T16:56:06.8601239Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70193/merge to s
2020-03-20T16:56:06.8604170Z Task         : Get sources
2020-03-20T16:56:06.8604455Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-20T16:56:06.8604687Z Version      : 1.0.0
2020-03-20T16:56:06.8605017Z Author       : Microsoft
---
2020-03-20T16:56:08.1178958Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-20T16:56:08.1187143Z ##[command]git config gc.auto 0
2020-03-20T16:56:08.1190837Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-20T16:56:08.1195569Z ##[command]git config --get-all http.proxy
2020-03-20T16:56:08.1204226Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/70193/merge:refs/remotes/pull/70193/merge
---
2020-03-20T17:53:03.2791796Z .................................................................................................... 1700/9803
2020-03-20T17:53:06.9175949Z .................................................................................................... 1800/9803
2020-03-20T17:53:16.7827168Z ..........................................................................i......................... 1900/9803
2020-03-20T17:53:22.2863816Z .................................................................................................... 2000/9803
2020-03-20T17:53:29.2228122Z ................................................................iiiii............................... 2100/9803
2020-03-20T17:53:44.9896927Z .................................................................................................... 2300/9803
2020-03-20T17:53:46.9509139Z .................................................................................................... 2400/9803
2020-03-20T17:53:49.5492603Z .................................................................................................... 2500/9803
2020-03-20T17:54:08.4137927Z .................................................................................................... 2600/9803
---
2020-03-20T17:56:38.6684503Z .....................................i...............i.............................................. 5000/9803
2020-03-20T17:56:46.8549497Z .................................................................................................... 5100/9803
2020-03-20T17:56:53.0130344Z ................................................................................i................... 5200/9803
2020-03-20T17:56:58.4040530Z .................................................................................................... 5300/9803
2020-03-20T17:57:08.3160059Z .............................................................ii.ii........i...i..................... 5400/9803
2020-03-20T17:57:16.2112926Z i................................................................................................... 5600/9803
2020-03-20T17:57:25.2630002Z .....i.............................................................................................. 5700/9803
2020-03-20T17:57:31.5735406Z ........................................................i........................................... 5800/9803
2020-03-20T17:57:37.7793312Z .................................................................................................... 5900/9803
2020-03-20T17:57:37.7793312Z .................................................................................................... 5900/9803
2020-03-20T17:57:45.4232053Z .................................................................................................... 6000/9803
2020-03-20T17:57:52.5351007Z ..................................................ii...i..ii...........i............................ 6100/9803
2020-03-20T17:58:11.6078090Z .................................................................................................... 6300/9803
2020-03-20T17:58:17.7541144Z .................................................................................................... 6400/9803
2020-03-20T17:58:17.7541144Z .................................................................................................... 6400/9803
2020-03-20T17:58:21.3971036Z ................................................................................i..ii............... 6500/9803
2020-03-20T17:58:42.5850907Z .................................................................................................... 6700/9803
2020-03-20T17:58:51.2712878Z ...............................................................................i.................... 6800/9803
2020-03-20T17:58:53.2133253Z .................................................................................................... 6900/9803
2020-03-20T17:58:55.0169056Z .................................................................................................... 7000/9803
---
2020-03-20T18:00:30.7779959Z .......................................................F............................................ 7800/9803
2020-03-20T18:00:35.6987501Z .................................................................................................... 7900/9803
2020-03-20T18:00:41.2283863Z ..................................................................i................................. 8000/9803
2020-03-20T18:00:50.3833884Z .................................................................................................... 8100/9803
2020-03-20T18:00:55.6214923Z ...............iiiiiiiiii..i........................................................................ 8200/9803
2020-03-20T18:01:08.6734653Z .................................................................................................... 8400/9803
2020-03-20T18:01:14.3785909Z .................................................................................................... 8500/9803
2020-03-20T18:01:28.3559123Z .................................................................................................... 8600/9803
2020-03-20T18:01:34.3415245Z .................................................................................................... 8700/9803
---
2020-03-20T18:03:18.4241438Z 
2020-03-20T18:03:18.4241588Z 10 LL | #[repr(align(15))]
2020-03-20T18:03:18.4241796Z 11    |        ^^^^^^^^^
2020-03-20T18:03:18.4242054Z 12 
2020-03-20T18:03:18.4242745Z - error[E0589]: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4243286Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4243949Z 15    |
2020-03-20T18:03:18.4244120Z 16 LL | #[repr(align(4294967296))]
2020-03-20T18:03:18.4244261Z 
2020-03-20T18:03:18.4244447Z 17    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4244447Z 17    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4244602Z 18 
2020-03-20T18:03:18.4244827Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4245470Z +    |
2020-03-20T18:03:18.4245470Z +    |
2020-03-20T18:03:18.4245736Z + LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4246185Z + 
2020-03-20T18:03:18.4246185Z + 
2020-03-20T18:03:18.4246426Z 19 error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4247240Z 21    |
2020-03-20T18:03:18.4247334Z 
2020-03-20T18:03:18.4247473Z 28 LL | #[repr(align(15))]
2020-03-20T18:03:18.4247661Z 29    |        ^^^^^^^^^
2020-03-20T18:03:18.4247661Z 29    |        ^^^^^^^^^
2020-03-20T18:03:18.4247798Z 30 
2020-03-20T18:03:18.4248201Z - error[E0589]: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4248535Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4249152Z 33    |
2020-03-20T18:03:18.4249312Z 34 LL | #[repr(align(4294967296))]
2020-03-20T18:03:18.4249465Z 
2020-03-20T18:03:18.4249612Z 35    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4249612Z 35    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4249764Z 36 
2020-03-20T18:03:18.4249997Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4250596Z +    |
2020-03-20T18:03:18.4250596Z +    |
2020-03-20T18:03:18.4250846Z + LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4251282Z + 
2020-03-20T18:03:18.4251282Z + 
2020-03-20T18:03:18.4251515Z 37 error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4252141Z 39    |
2020-03-20T18:03:18.4252236Z 
2020-03-20T18:03:18.4252391Z 46 LL | #[repr(align(15))]
2020-03-20T18:03:18.4252564Z 47    |        ^^^^^^^^^
2020-03-20T18:03:18.4252564Z 47    |        ^^^^^^^^^
2020-03-20T18:03:18.4252871Z 48 
2020-03-20T18:03:18.4253341Z - error[E0589]: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4253696Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4254710Z 51    |
2020-03-20T18:03:18.4254897Z 52 LL | #[repr(align(4294967296))]
2020-03-20T18:03:18.4255032Z 
2020-03-20T18:03:18.4255359Z 53    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4255359Z 53    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4255530Z 54 
2020-03-20T18:03:18.4255758Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4257304Z +    |
2020-03-20T18:03:18.4257304Z +    |
2020-03-20T18:03:18.4257787Z + LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4258261Z + 
2020-03-20T18:03:18.4258261Z + 
2020-03-20T18:03:18.4258543Z 55 error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4259258Z 57    |
2020-03-20T18:03:18.4259383Z 
2020-03-20T18:03:18.4259540Z 64 LL | #[repr(align(15))]
2020-03-20T18:03:18.4259733Z 65    |        ^^^^^^^^^
2020-03-20T18:03:18.4259733Z 65    |        ^^^^^^^^^
2020-03-20T18:03:18.4259888Z 66 
2020-03-20T18:03:18.4260381Z - error[E0589]: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4261338Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4262155Z 69    |
2020-03-20T18:03:18.4262353Z 70 LL | #[repr(align(4294967296))]
2020-03-20T18:03:18.4262518Z 
2020-03-20T18:03:18.4262714Z 71    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4262714Z 71    |        ^^^^^^^^^^^^^^^^^
2020-03-20T18:03:18.4262896Z 72 
2020-03-20T18:03:18.4263310Z - error: aborting due to 12 previous errors
2020-03-20T18:03:18.4263661Z + error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4264790Z +    |
2020-03-20T18:03:18.4264790Z +    |
2020-03-20T18:03:18.4265063Z + LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4265528Z + 
2020-03-20T18:03:18.4265704Z + error: aborting due to 16 previous errors
2020-03-20T18:03:18.4265904Z 74 
2020-03-20T18:03:18.4266338Z 75 For more information about this error, try `rustc --explain E0589`.
2020-03-20T18:03:18.4266338Z 75 For more information about this error, try `rustc --explain E0589`.
2020-03-20T18:03:18.4266561Z 76 
2020-03-20T18:03:18.4266674Z 
2020-03-20T18:03:18.4266764Z 
2020-03-20T18:03:18.4266953Z The actual stderr differed from the expected stderr.
2020-03-20T18:03:18.4267710Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/repr/repr-align/repr-align.stderr
2020-03-20T18:03:18.4268291Z To update references, rerun the tests and pass the `--bless` flag
2020-03-20T18:03:18.4268808Z To only update this specific test, also pass `--test-args repr/repr-align.rs`
2020-03-20T18:03:18.4269202Z error: 1 errors occurred comparing output.
2020-03-20T18:03:18.4269414Z status: exit code: 1
2020-03-20T18:03:18.4269414Z status: exit code: 1
2020-03-20T18:03:18.4271228Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/repr/repr-align.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/repr/repr-align" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/repr/repr-align/auxiliary"
2020-03-20T18:03:18.4272541Z ------------------------------------------
2020-03-20T18:03:18.4272706Z 
2020-03-20T18:03:18.4273019Z ------------------------------------------
2020-03-20T18:03:18.4273188Z stderr:
2020-03-20T18:03:18.4273188Z stderr:
2020-03-20T18:03:18.4273520Z ------------------------------------------
2020-03-20T18:03:18.4273910Z error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4274633Z    |
2020-03-20T18:03:18.4274633Z    |
2020-03-20T18:03:18.4274918Z LL | #[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4275431Z 
2020-03-20T18:03:18.4275431Z 
2020-03-20T18:03:18.4275639Z error[E0589]: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4276328Z    |
2020-03-20T18:03:18.4276328Z    |
2020-03-20T18:03:18.4276595Z LL | #[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4276998Z 
2020-03-20T18:03:18.4276998Z 
2020-03-20T18:03:18.4277221Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4278069Z    |
2020-03-20T18:03:18.4278069Z    |
2020-03-20T18:03:18.4281159Z LL | #[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4281941Z 
2020-03-20T18:03:18.4281941Z 
2020-03-20T18:03:18.4282150Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4284091Z    |
2020-03-20T18:03:18.4284091Z    |
2020-03-20T18:03:18.4285246Z LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4285689Z 
2020-03-20T18:03:18.4285689Z 
2020-03-20T18:03:18.4285906Z error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4286699Z    |
2020-03-20T18:03:18.4286699Z    |
2020-03-20T18:03:18.4286984Z LL | #[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4287423Z 
2020-03-20T18:03:18.4287423Z 
2020-03-20T18:03:18.4287639Z error[E0589]: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4288315Z    |
2020-03-20T18:03:18.4288315Z    |
2020-03-20T18:03:18.4288579Z LL | #[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4289007Z 
2020-03-20T18:03:18.4289007Z 
2020-03-20T18:03:18.4289407Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4290094Z    |
2020-03-20T18:03:18.4290094Z    |
2020-03-20T18:03:18.4290376Z LL | #[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4290813Z 
2020-03-20T18:03:18.4290813Z 
2020-03-20T18:03:18.4291039Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4291696Z    |
2020-03-20T18:03:18.4291696Z    |
2020-03-20T18:03:18.4291959Z LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4292357Z 
2020-03-20T18:03:18.4292357Z 
2020-03-20T18:03:18.4292580Z error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4293424Z    |
2020-03-20T18:03:18.4293424Z    |
2020-03-20T18:03:18.4293709Z LL | #[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4295877Z 
2020-03-20T18:03:18.4295877Z 
2020-03-20T18:03:18.4296089Z error[E0589]: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4296873Z    |
2020-03-20T18:03:18.4296873Z    |
2020-03-20T18:03:18.4297137Z LL | #[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4297745Z 
2020-03-20T18:03:18.4297745Z 
2020-03-20T18:03:18.4298090Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4299251Z    |
2020-03-20T18:03:18.4299251Z    |
2020-03-20T18:03:18.4299553Z LL | #[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4300135Z 
2020-03-20T18:03:18.4300135Z 
2020-03-20T18:03:18.4300359Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4301109Z    |
2020-03-20T18:03:18.4301109Z    |
2020-03-20T18:03:18.4301363Z LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4301958Z 
2020-03-20T18:03:18.4301958Z 
2020-03-20T18:03:18.4302207Z error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4302901Z    |
2020-03-20T18:03:18.4302901Z    |
2020-03-20T18:03:18.4303225Z LL | #[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer
2020-03-20T18:03:18.4303828Z 
2020-03-20T18:03:18.4303828Z 
2020-03-20T18:03:18.4304032Z error[E0589]: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4304706Z    |
2020-03-20T18:03:18.4304706Z    |
2020-03-20T18:03:18.4304969Z LL | #[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
2020-03-20T18:03:18.4305381Z 
2020-03-20T18:03:18.4305381Z 
2020-03-20T18:03:18.4305583Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4306442Z    |
2020-03-20T18:03:18.4306442Z    |
2020-03-20T18:03:18.4306720Z LL | #[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
2020-03-20T18:03:18.4307182Z 
2020-03-20T18:03:18.4307182Z 
2020-03-20T18:03:18.4307391Z error[E0589]: invalid `repr(align)` attribute: larger than 4096
2020-03-20T18:03:18.4308070Z    |
2020-03-20T18:03:18.4308070Z    |
2020-03-20T18:03:18.4308306Z LL | #[repr(align(536870912))] // ok: this is the largest accepted alignment
2020-03-20T18:03:18.4308886Z 
2020-03-20T18:03:18.4309045Z error: aborting due to 16 previous errors
2020-03-20T18:03:18.4309186Z 
2020-03-20T18:03:18.4309572Z For more information about this error, try `rustc --explain E0589`.
---
2020-03-20T18:03:18.4312343Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-20T18:03:18.4312715Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-20T18:03:18.4312922Z 
2020-03-20T18:03:18.4313006Z 
2020-03-20T18:03:18.4316275Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-20T18:03:18.4318618Z 
2020-03-20T18:03:18.4318704Z 
2020-03-20T18:03:18.4319183Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-03-20T18:03:18.4319522Z Build completed unsuccessfully in 1:01:56
2020-03-20T18:03:18.4319522Z Build completed unsuccessfully in 1:01:56
2020-03-20T18:03:18.4344346Z == clock drift check ==
2020-03-20T18:03:18.4368341Z   local time: Fri Mar 20 18:03:18 UTC 2020
2020-03-20T18:03:18.5269701Z   network time: Fri, 20 Mar 2020 18:03:18 GMT
2020-03-20T18:03:18.5276775Z == end clock drift check ==
2020-03-20T18:03:18.9981873Z 
2020-03-20T18:03:19.0046788Z ##[error]Bash exited with code '1'.
2020-03-20T18:03:19.0061771Z ##[section]Finishing: Run build
2020-03-20T18:03:19.0107488Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70193/merge to s
2020-03-20T18:03:19.0112133Z Task         : Get sources
2020-03-20T18:03:19.0112444Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-20T18:03:19.0112706Z Version      : 1.0.0
2020-03-20T18:03:19.0112891Z Author       : Microsoft
2020-03-20T18:03:19.0112891Z Author       : Microsoft
2020-03-20T18:03:19.0113210Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-20T18:03:19.0113548Z ==============================================================================
2020-03-20T18:03:19.3403092Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-20T18:03:19.3447900Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/70193/merge to s
2020-03-20T18:03:19.3529955Z Cleaning up task key
2020-03-20T18:03:19.3531050Z Start cleaning up orphan processes.
2020-03-20T18:03:19.3795059Z Terminate orphan process: pid (3964) (python)
2020-03-20T18:03:19.3836031Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@Amanieu
Copy link
Member Author

Amanieu commented Mar 20, 2020

@bors try

@bors
Copy link
Contributor

bors commented Mar 20, 2020

⌛ Trying commit 3f1b797 with merge 8a2b22251fe99d18beab8fdca0e241231799a8b3...

@bors
Copy link
Contributor

bors commented Mar 21, 2020

☀️ Try build successful - checks-azure
Build commit: 8a2b22251fe99d18beab8fdca0e241231799a8b3 (8a2b22251fe99d18beab8fdca0e241231799a8b3)

@Centril
Copy link
Contributor

Centril commented Mar 21, 2020

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-70193 created and queued.
🤖 Automatically detected try build 8a2b22251fe99d18beab8fdca0e241231799a8b3
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 21, 2020
@Centril Centril added I-nominated T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Mar 21, 2020
@chorman0773
Copy link
Contributor

Limiting to 4k alignment could hurt specialized structures in an embedded context. For example, I haved used align(32k) (or rather the equivalent) to place objects in a half-bank on 65816. Half banks are specifically important, as that is conventionally the mapping division point, and the largest page size used by the mapper. It also makes it easier to place something at a precise address with fewer linker hacks.

@craterbot
Copy link
Collaborator

🚧 Experiment pr-70193 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@RalfJung
Copy link
Member

RalfJung commented May 9, 2020

🤣 I support this change but I am not a lang team member and I'm mostly unfamiliar with the code involved... I'll see if I can find someone.

@Dylan-DPC-zz
Copy link

r? @nikomatsakis

@RalfJung
Copy link
Member

Quoting @joshtriplett from Zulip:

I can confirm that that was the decision. We did, however, want the limit to come from the target definition, so that targets can easily define a larger limit.

If targets can override this, we need to find a good way to make sure people do not think that unsafe code can rely on 4k being the maximum alignment. (Some people seem to already think that now, for some reason.)

@Amanieu
Copy link
Member Author

Amanieu commented May 13, 2020

If you look at the list of pages sizes per archtecture, you'll see that all architectures have 4KB as their smallest page size. So I don't think it really makes sense to make this a per-target attribute.

@chorman0773
Copy link
Contributor

chorman0773 commented May 13, 2020 via email

@nikomatsakis
Copy link
Contributor

@Amanieu I believe part of the motivation here was that the limitation of 4K only arises because of interactions with the dynamic linker on some systems (and some LLVM limitations, I believe), and the hypothesis was that on some embedded platforms those things would be non-issues (and there would be legitimate reasons to want higher alignment requirements). It does seem like 'per target' may not be the most direct way to reason about those limits though (e.g., I may be on some target that supports dynamic linking but I may not plan to use it).

@Amanieu
Copy link
Member Author

Amanieu commented May 18, 2020

How about this: alignments greater than 4K are not allowed when generating PIC (position independent) code.

@RalfJung
Copy link
Member

When compiling an rlib, I don't think we know if that code will be position-independent or not -- or do we?

@hanna-kruppe
Copy link
Contributor

At least as long as rlibs can contain machine code and not just MIR, we (need to) know. But if this is a monomorphization time check (I think it might needs to be, due to promotion in generic functions?), that won't help all code, nor will it fire in check builds.

@nikomatsakis
Copy link
Contributor

It is not currently a monomorphization time check, though that was proposed as a possible alternative.

@joelpalmer joelpalmer added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 26, 2020
@Elinvynia Elinvynia added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 3, 2020
@Elinvynia Elinvynia added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 25, 2020
@crlf0710 crlf0710 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 17, 2020
@Muirrum Muirrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 6, 2020
@Dylan-DPC-zz
Copy link

@Amanieu what's the status of this?

@Dylan-DPC-zz
Copy link

Closing this after a discussion with the author.

@Dylan-DPC-zz Dylan-DPC-zz added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.