<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/sys/windows/stack_overflow.rs, branch 1.46.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.46.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.46.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2019-11-30T02:37:58+00:00</updated>
<entry>
<title>Format libstd/sys with rustfmt</title>
<updated>2019-11-30T02:37:58+00:00</updated>
<author>
<name>David Tolnay</name>
<email>dtolnay@gmail.com</email>
</author>
<published>2019-11-27T18:28:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c34fbfaad38cf5829ef5cfe780dc9d58480adeaa'/>
<id>urn:sha1:c34fbfaad38cf5829ef5cfe780dc9d58480adeaa</id>
<content type='text'>
This commit applies rustfmt with rust-lang/rust's default settings to
files in src/libstd/sys *that are not involved in any currently open PR*
to minimize merge conflicts. THe list of files involved in open PRs was
determined by querying GitHub's GraphQL API with this script:
https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8

With the list of files from the script in outstanding_files, the
relevant commands were:

    $ find src/libstd/sys -name '*.rs' \
        | xargs rustfmt --edition=2018 --unstable-features --skip-children
    $ rg libstd/sys outstanding_files | xargs git checkout --

Repeating this process several months apart should get us coverage of
most of the rest of the files.

To confirm no funny business:

    $ git checkout $THIS_COMMIT^
    $ git show --pretty= --name-only $THIS_COMMIT \
        | xargs rustfmt --edition=2018 --unstable-features --skip-children
    $ git diff $THIS_COMMIT  # there should be no difference
</content>
</entry>
<entry>
<title>libstd =&gt; 2018</title>
<updated>2019-02-27T19:06:15+00:00</updated>
<author>
<name>Taiki Endo</name>
<email>te316e89@gmail.com</email>
</author>
<published>2019-02-10T19:23:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=93b6d9e086c6910118a57e4332c9448ab550931f'/>
<id>urn:sha1:93b6d9e086c6910118a57e4332c9448ab550931f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove licenses</title>
<updated>2018-12-26T04:08:33+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2018-12-25T15:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a663555ddf36f6b041445894a8c175cd1bc718c'/>
<id>urn:sha1:2a663555ddf36f6b041445894a8c175cd1bc718c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix warnings during tests</title>
<updated>2016-01-26T17:29:28+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2016-01-23T07:49:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cb343c33acf0f9833d8d6eb637234acf4321976b'/>
<id>urn:sha1:cb343c33acf0f9833d8d6eb637234acf4321976b</id>
<content type='text'>
The deny(warnings) attribute is now enabled for tests so we need to weed out
these warnings as well.
</content>
</entry>
<entry>
<title>std: Migrate to the new libc</title>
<updated>2015-11-10T06:55:50+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-11-03T00:23:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11'/>
<id>urn:sha1:3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11</id>
<content type='text'>
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself
* Update all references to use `libc` as a result.
* Update all references to the new flat namespace.
* Moves all windows bindings into sys::c
</content>
</entry>
<entry>
<title>std: Internalize almost all of `std::rt`</title>
<updated>2015-09-11T18:19:20+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-09-08T22:53:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f4be2026dfb507e5db919cc5df8fd934e05fa0b8'/>
<id>urn:sha1:f4be2026dfb507e5db919cc5df8fd934e05fa0b8</id>
<content type='text'>
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
</content>
</entry>
<entry>
<title>Remove morestack support</title>
<updated>2015-08-10T23:35:44+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-07-27T20:41:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a3fdfbf674a08b7f6fd32c9124e52924a2f9a1c'/>
<id>urn:sha1:7a3fdfbf674a08b7f6fd32c9124e52924a2f9a1c</id>
<content type='text'>
This commit removes all morestack support from the compiler which entails:

* Segmented stacks are no longer emitted in codegen.
* We no longer build or distribute libmorestack.a
* The `stack_exhausted` lang item is no longer required

The only current use of the segmented stack support in LLVM is to detect stack
overflow. This is no longer really required, however, because we already have
guard pages for all threads and registered signal handlers watching for a
segfault on those pages (to print out a stack overflow message). Additionally,
major platforms (aka Windows) already don't use morestack.

This means that Rust is by default less likely to catch stack overflows because
if a function takes up more than one page of stack space it won't hit the guard
page. This is what the purpose of morestack was (to catch this case), but it's
better served with stack probes which have more cross platform support and no
runtime support necessary. Until LLVM supports this for all platform it looks
like morestack isn't really buying us much.

cc #16012 (still need stack probes)
Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
</content>
</entry>
<entry>
<title>syntax: Implement #![no_core]</title>
<updated>2015-08-04T00:23:01+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-07-30T00:01:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5cccf3cd256420d9f32c265e83036dea1d5f94d8'/>
<id>urn:sha1:5cccf3cd256420d9f32c265e83036dea1d5f94d8</id>
<content type='text'>
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of
the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The
`#![no_std]` attribute now injects `extern crate core` at the top of the crate
as well as the libcore prelude into all modules (in the same manner as the
standard library's prelude). The `#![no_core]` attribute disables both std and
core injection.

[rfc]: https://github.com/rust-lang/rfcs/pull/1184
</content>
</entry>
<entry>
<title>Rewrite the improper_ctypes lint.</title>
<updated>2015-07-24T00:03:04+00:00</updated>
<author>
<name>Eli Friedman</name>
<email>eli.friedman@gmail.com</email>
</author>
<published>2015-06-25T21:48:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6fa17b43d351ed4f9093cf80f4044d1208044241'/>
<id>urn:sha1:6fa17b43d351ed4f9093cf80f4044d1208044241</id>
<content type='text'>
Makes the lint a bit more accurate, and improves the quality of the diagnostic
messages by explicitly returning an error message.

The new lint is also a little more aggressive: specifically, it now
rejects tuples, and it recurses into function pointers.
</content>
</entry>
<entry>
<title>std: Fix Windows XP compatibility</title>
<updated>2015-06-28T02:45:24+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-06-26T16:30:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=10b103af48368c5df644fa61dc417a36083922c8'/>
<id>urn:sha1:10b103af48368c5df644fa61dc417a36083922c8</id>
<content type='text'>
This commit enables executables linked against the standard library to run on
Windows XP. There are two main components of this commit:

* APIs not available on XP are shimmed to have a fallback implementation and use
  runtime detection to determine if they are available.
* Mutexes on Windows were reimplemented to use critical sections on XP where
  rwlocks are not available.

The APIs which are not available on XP are:

* SetFileInformationByHandle - this is just used by `File::truncate` and that
  function just returns an error now.
* SetThreadStackGuarantee - this is used by the stack overflow support on
  windows, but if this isn't available then it's just ignored (it seems
  non-critical).
* All condition variable APIs are missing - the shims added for these apis
  simply always panic for now. We may eventually provide a fallback
  implementation, but for now the standard library does not rely on condition
  variables for normal use.
* RWLocks, like condition variables, are missing entirely. The same story for
  condition variables is taken here. These APIs are all now panicking stubs as
  the standard library doesn't rely on RWLocks for normal use.

Currently, as an optimization, we use SRWLOCKs for the standard `sync::Mutex`
implementation on Windows, which is indeed required for normal operation of the
standard library. To allow the standard library to run on XP, this commit
reimplements mutexes on Windows to use SRWLOCK instances *if available* and
otherwise a CriticalSection is used (with some checking for recursive
locking).

With all these changes put together, a 32-bit MSVC-built executable can run on
Windows XP and print "hello world"

Closes #12842
Closes #19992
Closes #24776
</content>
</entry>
</feed>
