[Git][ghc/ghc][wip/T22272] 9 commits: Fix bounds-checking buglet in Data.Array.Byte

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Thu Dec 8 17:22:59 UTC 2022



Simon Peyton Jones pushed to branch wip/T22272 at Glasgow Haskell Compiler / GHC


Commits:
e902d771 by Matthew Craven at 2022-12-08T08:30:23-05:00
Fix bounds-checking buglet in Data.Array.Byte

...another manifestation of #20851 which
I unfortunately missed in my first pass.

- - - - -
8d36c0c6 by Gergő Érdi at 2022-12-08T08:31:03-05:00
Remove copy-pasted definitions of `graphFromEdgedVertices*`

- - - - -
c5d8ed3a by Gergő Érdi at 2022-12-08T08:31:03-05:00
Add version of `reachableGraph` that avoids loop for cyclic inputs
by building its result connected component by component

Fixes #22512

- - - - -
90cd5396 by Krzysztof Gogolewski at 2022-12-08T08:31:39-05:00
Mark Type.Reflection.Unsafe as Unsafe

This module can be used to construct ill-formed TypeReps, so it should
be Unsafe.

- - - - -
2057c77d by Ian-Woo Kim at 2022-12-08T08:32:19-05:00
Truncate eventlog event for large payload (#20221)

RTS eventlog events for postCapsetVecEvent are truncated if payload
is larger than EVENT_PAYLOAD_SIZE_MAX
Previously, postCapsetVecEvent records eventlog event with payload
of variable size larger than EVENT_PAYLOAD_SIZE_MAX (2^16) without
any validation, resulting in corrupted data.
For example, this happens when a Haskell binary is invoked with very
long command line arguments exceeding 2^16 bytes (see #20221).
Now we check the size of accumulated payload messages incrementally,
and truncate the message just before the payload size exceeds
EVENT_PAYLOAD_SIZE_MAX. RTS will warn the user with a message showing
how many arguments are truncated.

- - - - -
9ec76f61 by Cheng Shao at 2022-12-08T08:32:59-05:00
hadrian: don't add debug info to non-debug ways of rts

Hadrian used to pass -g when building all ways of rts. It makes output
binaries larger (especially so for wasm backend), and isn't needed by
most users out there, so this patch removes that flag. In case the
debug info is desired, we still pass -g3 when building the debug way,
and there's also the debug_info flavour transformer which ensures -g3
is passed for all rts ways.

- - - - -
7658cdd4 by Krzysztof Gogolewski at 2022-12-08T08:33:36-05:00
Restore show (typeRep @[]) == "[]"

The Show instance for TypeRep [] has changed in 9.5 to output "List"
because the name of the type constructor changed.
This seems to be accidental and is inconsistent with TypeReps of saturated
lists, which are printed as e.g. "[Int]".
For now, I'm restoring the old behavior; in the future,
maybe we should show TypeReps without puns (List, Tuple, Type).

- - - - -
6563a237 by Gergő Érdi at 2022-12-08T17:22:50+00:00
Fix loop in the interface representation of some `Unfolding` fields

As discovered in #22272, dehydration of the unfolding info of a
recursive definition used to involve a traversal of the definition
itself, which in turn involves traversing the unfolding info. Hence,
a loop.

Instead, we now store enough data in the interface that we can produce
the unfolding info without this traversal. See Note [Tying the 'CoreUnfolding' knot]
for details.

- - - - -
9eabe4b2 by Simon Peyton Jones at 2022-12-08T17:22:50+00:00
Improve the UnfoldingCache mechanism

This small patch adds some documentation around the new UnfoldingCache
field.  But most important it does two things:

* In GHC.Core.Unfold.Make.mkCoreUnfolding we we accidentally forcing
  the wrong values, which led to duplicate work.

* In GHC.Core.Unfold.callSiteInline we were forcing UnfoldingCache
  which caused unnecessary work.

- - - - -


30 changed files:

- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Seq.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Data/Graph/Directed.hs
- compiler/GHC/Iface/Rename.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs
- hadrian/src/Settings/Packages.hs
- libraries/base/Data/Array/Byte.hs
- libraries/base/Data/Typeable/Internal.hs
- libraries/base/Type/Reflection/Unsafe.hs
- libraries/base/changelog.md
- rts/eventlog/EventLog.c
- testsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/numeric/should_compile/T14170.stdout
- testsuite/tests/numeric/should_compile/T14465.stdout
- testsuite/tests/numeric/should_compile/T7116.stdout
- + testsuite/tests/simplCore/should_compile/T22272.hs
- + testsuite/tests/simplCore/should_compile/T22272.stderr
- + testsuite/tests/simplCore/should_compile/T22272_A.hs
- testsuite/tests/simplCore/should_compile/T3772.stdout
- testsuite/tests/simplCore/should_compile/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/28944f434538eb4c86f919776f7236c926617908...9eabe4b279f6d585791bd79a2172fcc29a079921

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/28944f434538eb4c86f919776f7236c926617908...9eabe4b279f6d585791bd79a2172fcc29a079921
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221208/b3f533bc/attachment.html>


More information about the ghc-commits mailing list