tag:github.com,2008:https://github.com/Atry/hhvm/releasesTags from hhvm2022-05-12T04:44:19Ztag:github.com,2008:Repository/428432220/v2022.05.112022-05-12T05:48:27ZNightly v2022.05.11 for Debian and UbuntuAtrytag:github.com,2008:Repository/428432220/nix-bug-report2022-05-04T00:18:45Znix-bug-reportAtrytag:github.com,2008:Repository/428432220/nightly-2021.11.152021-11-14T15:23:16Znightly-2021.11.15: always warn when iterating naming-sqlite<p>always warn when iterating naming-sqlite</p>
<p>Summary:
<br />We shouldn't be iterating over every row in naming-sqlite.</p>
<p>I'd already written an NAMING_COSTLY_ITER for whenever we did that iteration, but I suppressed it for the one known case - namely, saved-state-init to populate Typing_deps.Files.ifiles.</p>
<p>More specifically, ServerLazyInit calls `ServerInitCommon.update_files ~warn_on_naming_costly_iter:false`, which has
<br />```
<br /> if Naming_provider.ByHash.need_update_files ctx then
<br /> Naming_table.iter
<br /> ?warn_on_naming_costly_iter
<br /> naming_table
<br />```
<br />This is the only place in the codebase which can pass `false` into Naming_sqlite.iter. It can only happen if `Naming_provider.ByHash.need_update_files` returns true. Its code only ever returns true if it has to use its own ifiles, in which case it also logs `INVARIANT_VIOLATION_BUG [desc=dephash_lookup_...]`.</p>
<p>But we know from telemetry that nothing is producing that INVARIANT_VIOLATION_BUG/dephash_lookup any longer. Therefore, nothing is passing `~warn_on_naming_costly_iter:false` into Naming_sqlite.iter.</p>
<p>So, I'm going to remove the suppression.</p>
<p>Differential Revision: D30966608</p>
<p>fbshipit-source-id: e14cb200c92650fa227cec2632e7489390f1949d</p>ljw1004tag:github.com,2008:Repository/428432220/nightly-2021.11.142021-11-13T19:11:54Znightly-2021.11.14: Increase prof-data file max StringData size<p>Increase prof-data file max StringData size</p>
<p>Summary:
<br />Now that we're encoding argument types into the prof-data file, it's
<br />possible to exceed the 2 MB string limit. This is most apparent with
<br />some test cases, which produce giant strings because of const-propping
<br />in the JIT or HHBBC. If they get passed as an argument, they might be
<br />encoded in the prof-data file.</p>
<p>This has always been an issue, as there's nothing preventing us from
<br />having StringData* which are larger than 2 MB. We really should be
<br />setting the limit at StringData::MaxSize instead. "CPP" strings can
<br />continue to have the lower limit.</p>
<p>Reviewed By: oulgen</p>
<p>Differential Revision: D32411999</p>
<p>fbshipit-source-id: c6a9a5e940d09d3c178d67b016152b0b6b91c564</p>ricklavoietag:github.com,2008:Repository/428432220/nightly-2021.11.132021-11-13T00:10:48Znightly-2021.11.13: Update get_declared_traits_basic_001.php.expectf<p>Update get_declared_traits_basic_001.php.expectf</p>
<p>Summary: D32103091 (<a class="commit-link" href="https://github.com/facebook/hhvm/commit/da5a7afbb130ffd8f59238db9da43f9444d02170">facebook@<tt>da5a7af</tt></a>) added an entry to the expected list, but didn't update the vec size.</p>
<p>Reviewed By: fredemmott</p>
<p>Differential Revision: D32406482</p>
<p>fbshipit-source-id: c8b7686d909123466fb14a98ad2ce555c7cd4562</p>rodmktag:github.com,2008:Repository/428432220/nightly-2021.11.122021-11-12T01:43:24Znightly-2021.11.12: Add truncate to writable files (#8930)<p>Add truncate to writable files (<a class="issue-link js-issue-link" href="https://github.com/facebook/hhvm/pull/8930">facebook#8930</a>)</p>
<p>Summary:
<br /><span class="issue-keyword tooltipped tooltipped-se">Fixes</span> <a class="issue-link js-issue-link" href="https://github.com/hhvm/hsl-experimental/issues/165">hhvm/hsl-experimental#165</a></p>
<p>I had great difficulty reading the manpage for ftruncate. I believe there are no errno errors that we need to wrap for the caller. But because I am very inexperienced with this, I have included my reasoning below.
<br />[manpage used](<a href="https://www.man7.org/linux/man-pages/man3/ftruncate.3p.html">https://www.man7.org/linux/man-pages/man3/ftruncate.3p.html</a>)</p>
<p>_EINTR A signal was caught during execution._
<br />From src/os/README.md
<br />```
<br />### Performance</p>
<p>- constructing an exception requires constructing the backtrace; it should be
<br /> avoided for 'expected' cases. For example, if it is safe to, calls are
<br /> retried on EINTR 5 times.
<br /> - only do this if it is transparent - i.e. the user can't easily tell if
<br /> the call was retried or was just slow.
<br />```
<br />Would this be a candidate for automatic retry?</p>
<p>_EINVAL The length argument was less than 0._
<br />Caught this with `_OS\arg_assert()`.</p>
<p>_EFBIG or EINVAL The length argument was greater than the maximum file size._
<br />I can't know what the maximum file size is. It might throw EINVAL (which is what `_OS\arg_assert($length <= $MAX_FILE_SIZE, '...')` would have thrown) or `EFBIG`. I would catch EFBIG and throw EINVAL instead, but the next entry would incorrectly have its error code changed.</p>
<p>_EFBIG The file is a regular file and length is greater than the offset maximum established in the open file description associated with fildes._
<br />See previous entry.</p>
<p>_EIO An I/O error occurred while reading from or writing to a file system._
<br />This is disks being disks...</p>
<p>_EBADF or EINVAL The fildes argument is not a file descriptor open for writing._
<br />`File\open_write_only()` already checked for write permission.</p>
<p>Pull Request <span class="issue-keyword tooltipped tooltipped-se">resolved</span>: <a class="issue-link js-issue-link" href="https://github.com/facebook/hhvm/pull/8930">facebook#8930</a></p>
<p>Reviewed By: viratyosin</p>
<p>Differential Revision: D32103091</p>
<p>fbshipit-source-id: 60857e59146fe9ee1eb5c881a5d04da794b29569</p>lexidortag:github.com,2008:Repository/428432220/nightly-2021.11.112021-11-10T23:38:39Znightly-2021.11.11<p>fix error message when instance method/property called as static meth…</p>
<p>…od/property (<a class="issue-link js-issue-link" href="https://github.com/facebook/hhvm/pull/8921">facebook#8921</a>)</p>
<p>Summary:
<br />This PR:
<br />- Update error message when an instance method/property is used as a static method/property
<br />- Link to this [Issue](<a href="https://gist.github.com/shayne-fletcher/4cece69915f546ea68983172aaa7318e">https://gist.github.com/shayne-fletcher/4cece69915f546ea68983172aaa7318e</a>)</p>
<p>Pull Request <span class="issue-keyword tooltipped tooltipped-se">resolved</span>: <a class="issue-link js-issue-link" href="https://github.com/facebook/hhvm/pull/8921">facebook#8921</a></p>
<p>Test Plan: Imported from GitHub, without a `Test Plan:` line.</p>
<p>Reviewed By: Wilfred</p>
<p>Differential Revision: D32119355</p>
<p>Pulled By: shayne-fletcher</p>
<p>fbshipit-source-id: b313f1241debe4df7b77b247b3c3c86c0c7f887f</p>vulongphantag:github.com,2008:Repository/428432220/nightly-2021.11.102021-11-10T00:54:19Znightly-2021.11.10<p>Raise error when a trait is <<__ConsistentConstruct>> but does not de…</p>
<p>…clare an explicit constructor</p>
<p>Summary:
<br />Trait method copy-paste behavior breaks down with ConsistentConstruct, where unlike classes, traits to not generate a pure default constructor. This leads to a bug where a trait method can call `new static()` and assume the constructor is pure when it is really impure in the class that uses the trait.</p>
<p>This diff adds a flag to raise an error when a trait is <<__ConsistentConstruct>> without an explicit constructor. If the trait does have a constructor, then it's okay because the class that uses the trait will be forced to be consistent.</p>
<p>For the sake of completeness, I've added an option to raise this error on *all* classish declarations that do not explicitly declare a constructor, as the consistency is really more of a property of the constructor than of the classish.</p>
<p>Reviewed By: jamesjwu</p>
<p>Differential Revision: D32151766</p>
<p>fbshipit-source-id: 74fc75b64316286b66678707dccb471564546b90</p>vassilmladenovtag:github.com,2008:Repository/428432220/nightly-2021.11.092021-11-09T02:15:28Znightly-2021.11.09<p>Make object property write error message more generic to all contexts…</p>
<p>… without write_props</p>
<p>Summary: The next diff is moving towards a more generic solution where we always perform checks on object property writes whenever the write_props capability isn't available. The error message should be updated accordingly. This affects a lot of tests, so I'm moving the error message change into a separate diff for ease of review.</p>
<p>Reviewed By: jamesjwu</p>
<p>Differential Revision: D31979522</p>
<p>fbshipit-source-id: 8d32589c15abab0a0041e6a465321d0e5b43b531</p>chenmelatag:github.com,2008:Repository/428432220/HHVM-4.135.02021-11-08T18:05:47ZHHVM-4.135.0fredemmott