Skip to content
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

[ HipHop Debugger ] dict[0 => NAN] equals itself in the debugger, but not cli or server mode #9272

Open
lexidor opened this issue Oct 21, 2022 · 0 comments

Comments

@lexidor
Copy link
Collaborator

lexidor commented Oct 21, 2022

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:

  1. Run the above code from the cli using hhvm --no-config file.hack
  2. Run the above code in web server mode using hhvm --no-config -m server -p 8080 and visit localhost:8080/file.hack
  3. Observe not equal being printed in both cases.
  4. Start the HipHop debugger using hhvm --no-config -a.
  5. Paste the following statement echo (dict[0 => NAN] === dict[0 => NAN] ? 'equal' : 'not equal')."\n";.
  6. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant