You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
For any object that contains prototype, Debug::fmt will cause a stack overflow. This is especially frustrating when some tests fail, as it can mask the reason for the failure.
To Reproduce
Evaluate the following JS and println!("{:?}", result).
newDate()
Expected behavior
Print the debug structure of the value.
Actual behavior
A stack overflow occurs.
Build environment (please complete the following information):
OS: Windows
Version: 10
Target triple: x86_64-unknown-windows-msvc
Rustc version: 1.45.1 (c367798cf 2020-07-26)
The text was updated successfully, but these errors were encountered:
I think we have to decide if we will somehow print the prototype, or if the prototype should have a special debug implementation, so that it doesn't end with circular reference debugging.
The HashSet can then be used to avoid infinite recursion (by adding the address of GcObject to it), with the additional benefit that it won't print the same structure multiple times (which would make Debug nearly useless if you have a large structure appear multiple times in the output).
The main drawback of all of this is that we'd lose #[derive(Debug)] and we'd have to implement both Debug (forwarding to SafeDebug) and SafeDebug for everything.
Describe the bug
For any object that contains
prototype
,Debug::fmt
will cause a stack overflow. This is especially frustrating when some tests fail, as it can mask the reason for the failure.To Reproduce
Evaluate the following JS and
println!("{:?}", result)
.Expected behavior
Print the debug structure of the value.
Actual behavior
A stack overflow occurs.
Build environment (please complete the following information):
x86_64-unknown-windows-msvc
1.45.1 (c367798cf 2020-07-26)
The text was updated successfully, but these errors were encountered: