[DTrace-devel] [oracle/dtrace-utils] 1efbc5: cg: rework data size to BPF size conversion and im...

Kris Van Hees noreply at github.com
Thu Sep 7 22:08:57 UTC 2023


  Branch: refs/heads/kvh/2.0-branch-dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 1efbc5272d419c976506aed540393206988665da
      https://github.com/oracle/dtrace-utils/commit/1efbc5272d419c976506aed540393206988665da
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M libdtrace/dt_cg.c

  Log Message:
  -----------
  cg: rework data size to BPF size conversion and improve error reporting

The code generator contains multiple places with an assertion to ensure
that the size of scalar loads and stores is 1, 2, 4, or 8 bytes.  Two
places issued an internal compiler error instead of using an assertion.

All instances of verifying scalar size are now consolidated into a
function that returns the BPF size for the given size if it is valid,
and reports an internal error if not.  New macros (BPF_STOREX, BPF_LOADX,
and BPF_STOREX_IMM) are introduced to allow the passing of a data size
rather than a BPF size.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: fb1ce0571ba0be63c32ffe97e0a7359a180ef570
      https://github.com/oracle/dtrace-utils/commit/fb1ce0571ba0be63c32ffe97e0a7359a180ef570
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M bpf/inet_ntoa6.S
    M test/unittest/funcs/inet_ntoa6/tst.inet_ntoa6.d
    M test/unittest/funcs/inet_ntoa6/tst.inet_ntoa6.r
    M test/unittest/funcs/inet_ntoa6/tst.inet_ntoa6.strsize_40.r

  Log Message:
  -----------
  Do not use :: in IPv6 addresses without zero-collapsing

Addresses that do not contain a sequence of two or more zero-words should
not contain the zero-collapse marker (::).

The testcase has been expanded to contain at least one of each possible
case: leading collapsible zero-words, collapsible zero-words in the middle,
trailing collapsible zero-words, addresses without zero-words.

Reported-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/8b6ebc45536a...fb1ce0571ba0



More information about the DTrace-devel mailing list