Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPanic broken on Windows XP #34538
Comments
This comment has been minimized.
This comment has been minimized.
|
Indeed this should definitely work! Would you be able to debug a bit and explore why the double panic is happening? (e.g. the panic messages that were printed or the stack traces) |
This comment has been minimized.
This comment has been minimized.
|
I'm also not sure I've ever heard of pc-windows-gnu working on XP, so MSVC may work better. Even then though we don't regularly test so it may still have regressed. |
This comment has been minimized.
This comment has been minimized.
|
Hm, I can try to see if I can install a debugger and get more info, but I did find passcod/notify#79 (comment) which seems to include a stack trace of the same issue happening with a double panic.
It seems to work well enough here, besides the aforementioned issue. If I don't trigger a panic most basic functionality seems fine! I don't have a MSVC Rust dev setup, but if anyone wants to compile the minimal test program and attach an exe I can try running it! |
This comment has been minimized.
This comment has been minimized.
|
Aha, that'd do it. When a thread panics it attempts to run its panic hook, but that panic hook is protected by an RwLock which is in turn not implemented on XP. That means that when panicking you'll panic immediately as you attempt to acquire an rwlock. We could change this to use a mutex somehow perhaps which I believe is implemented on XP at least. |
alexcrichton
added
the
O-windows
label
Jun 29, 2016
This comment has been minimized.
This comment has been minimized.
|
Alternatively all of Rust's synchronization primitives could be replaced by versions from |
Mark-Simulacrum
added
the
C-bug
label
Jul 25, 2017
This comment has been minimized.
This comment has been minimized.
|
Triage: no changes I'm aware of |
This comment has been minimized.
This comment has been minimized.
mbilker
commented
Nov 9, 2018
|
I found that this happens to me too. I may go and modify the panic handler to use a |
This comment has been minimized.
This comment has been minimized.
mbilker
commented
Nov 9, 2018
|
Would there be too much of a performance hit if Mutexes work on XP since it falls back to using |
arcnmx commentedJun 28, 2016
•
edited
On Windows XP, the program
fn main() { panic!() }will fail to run with the following:I understand that XP isn't necessarily supported by the standard library, and certain sync implementations are stubbed out (probably the root cause of this issue?), but panicking seems like an operation that should really work if at all possible...
Tested with
i686-pc-windows-gnutarget and mingw-w64 on: