Skip to content

Incorrect filesize and timestamps for JavaScript backend

The JavaScript backend still has some bugs when filling the stat data used in the FileStatus data structure:

Some issues I've found:

  • the time fields (st_atime/st_mtime/st_ctime) fields are filled assuming that the size reported by the configure script is for whole timespec struct, which results in 32 bit for the seconds + 32 bit for nanoseconds. In reality stat.st_mtime is actually defined to be stat.st_mtim.tv_sec and should be 64 bit.
  • the large field st_size is filled in the wrong order, resulting in the wrong size being decoded.

I'm working on a fix and adding a test that tests these basic file properties so that we can find them in a simple test (instead in something strange going wrong in cabal/backpack tests)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information