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

parallel/test-buffer-writefloat wrong assumption of NaN representation on mipsel ? #42945

Closed
kapouer opened this issue May 2, 2022 · 3 comments
Labels
test Issues and PRs related to the tests.

Comments

@kapouer
Copy link
Contributor

kapouer commented May 2, 2022

Version

16.14.2

Platform

debian/bookworm

Subsystem

test

What steps will reproduce the bug?

on mipsel, Quad Core Loongson 3A3000,
Test fails at

assert.ok(
buffer.equals(new Uint8Array(
[ 0x7F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F ])));

How often does it reproduce? Is there a required condition?

It doesn't fail on all mips CPU debian is using to build their packages.

What is the expected behavior?

The test should succeed in comparing internal representations of NaN, regardless of the CPU ?

What do you see instead?

not ok 184 parallel/test-buffer-writefloat
  ---
  duration_ms: 0.408
  severity: fail
  exitcode: 1
  stack: |-
    node:assert:399
        throw err;
        ^
    
    AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
    
      assert.ok(
        buffer.equals(new Uint8Array(
          [ 0x7F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F ])))
    
        at Object.<anonymous> (/<<PKGBUILDDIR>>/test/parallel/test-buffer-writefloat.js:61:10)
        at Module._compile (node:internal/modules/cjs/loader:1103:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
        at Module.load (node:internal/modules/cjs/loader:981:32)
        at Function.Module._load (node:internal/modules/cjs/loader:822:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
        at node:internal/main/run_main_module:17:47 {
      generatedMessage: true,
      code: 'ERR_ASSERTION',
      actual: false,
      expected: true,
      operator: '=='
    }

Additional information

This is for reference.
I know mipsel is not officially supported, but some people might find this report useful.

@VoltrexKeyva VoltrexKeyva added the test Issues and PRs related to the tests. label May 2, 2022
@bnoordhuis
Copy link
Member

What does the buffer contain? mipsel has IEEE-style floats, right? Any double with with an all-bits-one exponent (0x7FF) and a non-zero fraction is a NaN.

@kapouer
Copy link
Contributor Author

kapouer commented May 3, 2022

For now all I know is that the test pass on mipsel-osuosl-04 but not mipsel-osuosl-05 (see below for details about archs),
and that mipsel-osuosl-05 has the old IEEE 754-2008 standard.

mipsel-osuosl-04

system type : Generic Loongson64 System
machine : loongson,loongson64c-4core-rs780e
processor : 0
cpu model : ICT Loongson-3 V0.9 FPU V0.1
BogoMIPS : 2992.12
wait instruction : yes
microsecond timers : yes
tlb_entries : 1088
extra interrupt vector : no
hardware watchpoint : no
isa : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
ASEs implemented : dsp dsp2 vz loongson-mmi loongson-cam loongson-ext loongson-ext2
shadow register sets : 1
kscratch registers : 6
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

mipsel-osuosl-05

system type : Generic Loongson64 System
machine : loongson,loongson64g-4core-ls7a
processor : 0
cpu model : ICT Loongson-3 V0.4 FPU V0.1
BogoMIPS : 3592.19
wait instruction : yes
microsecond timers : yes
tlb_entries : 2112
extra interrupt vector : no
hardware watchpoint : no
isa : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
ASEs implemented : vz msa loongson-mmi loongson-cam loongson-ext loongson-ext2
shadow register sets : 1
kscratch registers : 6
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

@kapouer
Copy link
Contributor Author

kapouer commented Dec 4, 2023

Closing, debian dropped mipsel in favor of mips64el.

@kapouer kapouer closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

3 participants