Program behavior changes when debugged - Object prototype property
Reported by
sandroto...@googlemail.com,
Nov 23
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce the problem: 1. Open "min.html" (see attached) 2. Inspect console for exceptions, none are thrown 3. Set breakpoint as shown in "devtools.mkv" What is the expected behavior? The program behavior should not change, regardless of the program being debugged. What went wrong? The program behavior changes. My best guess would be that the "getLen" function is somehow called while gathering some data for the debugger. However, the bug is only triggered if the last 3 lines are inside function, if they are in the global scope, the bug does not trigger. Did this work before? N/A Chrome version: 70.0.3538.102 (Official Build) Arch Linux (64-bit) Channel: stable OS Version: Arch Linux Flash Version: n/a
,
Nov 25
When the breakpoint is triggered DevTools shows your "sample" variable in its various panels, for which it has to access its contents, including the "length" property.
,
Dec 4
"The program behavior should not change, regardless of the program being debugged." This statement does not hold. Debugging can be detected by the underlying program. For example a function can measure time taken to execute it which is going to be different in presence of breakpoints. |
||
►
Sign in to add a comment |
||
Comment 1 by viswa.karala@chromium.org
, Nov 25