-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
OS Error 10014 (Bad address) when using "localhost" in UDP source address on Win7 #34202
Comments
Repo on Windows 10. Seems to crash on OS X as well. The Meanwhile, The 10014 is due to sending data from IPv6 socket to IPv4 host. So there are two problems shown from this issue:
|
@kennytm's diagnosis sounds like it'd do it. We can probably figure out the local address type by calling |
Clarify that send_to might panic in certain cases Closes rust-lang#34202 r? @alexcrichton
Description: rust-lang/rust#34202
Signed-off-by: wcampbell <wcampbell1995@gmail.com>
… r=m-ou-se Add link to Issue rust-lang#34202 in udp docs
… r=m-ou-se Add link to Issue rust-lang#34202 in udp docs
…laumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#84835 (Add link to Issue rust-lang#34202 in udp docs) - rust-lang#84852 (Change librustdoc write!(.. \n) to writeln!(..); fix comment grammar) - rust-lang#84854 (use double quotes and full path for E0761) - rust-lang#84856 (Correct stability of ErrorKind::OutOfMemory) - rust-lang#84858 (Fix stability attributes of byte-to-string specialization) - rust-lang#84860 (Link to MCP from target tier policy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Consider this code:
which fails like this:
thread '<main>' panicked at 'called
Result::unwrap()on an
Errvalue: Error { repr: Os { code: 10014, message: "Bei dem Versuch das Zeigerargument eines Aufrufs zu\r\nverwenden, wurde eine ung\u{fc}ltige Zeigeradresse gefunden." } }', ../src/libcore\result.rs:746
The error occurs on the last line by the way.
If you write
let local_addr="127.0.0.1:8900";
, it works just fine (no panic).If i remember correctly, this worked on Linux, so it should be an os specific issue. Of course you can just use an ip for the source address, but this kind of error shouldn't occur nevertheless right?
Meta
OS: Windows 7 Professional 64bit
rustc --version --verbose
:rustc 1.9.0 (e4e8b66 2016-05-18)
binary: rustc
commit-hash: e4e8b66
commit-date: 2016-05-18
host: x86_64-pc-windows-msvc
release: 1.9.0
Backtrace:
The text was updated successfully, but these errors were encountered: