[ HipHop Debugger ] dict[0 => NAN]
equals itself in the debugger, but not cli or server mode #9272
Description
Describe the bug
Comparing the value dict[0 => NAN]
to itself is equal in the HipHop debugger hhvm --no-config -a
. When running are script from the cli or in a webserver, these values are not equal.
Standalone code, or other way to reproduce the problem
<<__EntryPoint>>
function main(): void {
echo (dict[0 => NAN] === dict[0 => NAN] ? 'equal' : 'not equal')."\n";
}
Steps to reproduce the behavior:
- Run the above code from the cli using
hhvm --no-config file.hack
- Run the above code in web server mode using
hhvm --no-config -m server -p 8080
and visit localhost:8080/file.hack - Observe
not equal
being printed in both cases. - Start the HipHop debugger using
hhvm --no-config -a
. - Paste the following statement
echo (dict[0 => NAN] === dict[0 => NAN] ? 'equal' : 'not equal')."\n";
. - Observe
equal
being printed.
Expected behavior
The behavior of this comparison should not differ between debugger and script mode. From my understanding, they should compare equal.
See: https://github.com/facebook/hhvm/blob/master/hphp/test/slow/comparisons/nan_array_id_test.php and https://github.com/facebook/hhvm/blob/master/hphp/test/slow/comparisons/nan_array_id_test.php.expect
My understanding could be wrong here, so please verify what the proper behavior should be with someone in the know first.
Actual behavior
Output differs between the debugger and cli / server mode.
Environment
- Operating system
Ubuntu 18.04
- Installation method
apt-get with dl.hhvm.com repository
- HHVM Version
HipHop VM 4.169.0 (rel) (non-lowptr)
Compiler: 1663640616_852546864
Repo schema: ce4145c518e16986e860178941c05dc9f11eab61
Additional context
N/A