Skip to contentSkip to conversation

0cb64a: parser: validate scoped external names

oracle/dtrace Kris Van Hees 1 participant 1 message Oct 5

lore
Share & tools
lore

Kris Van Hees

author bot Reviewed-by Elena Zannoni Reviewed-by Elena Zannoni Reviewed-by Elena Zannoni Reviewed-by Elena Zannoni
#0 lore raw

Branch: refs/heads/dev-queue
Home: https://github.com/oracle/dtrace
Commit: 0cb64a9a12e78514d7730da428d10b0c5bae05e3

      https://github.com/oracle/dtrace/commit/0cb64a9a12e78514d7730da428d10b0c5bae05e3

Author: Kris Van Hees <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)

Changed paths:
M libdtrace/dt_decl.c
M libdtrace/dt_lex.l
M libdtrace/dt_module.c
M libdtrace/dt_parser.c
M libdtrace/dt_parser.h
M test/triggers/Build
M test/triggers/testprobe.c
A test/unittest/lexer/err.D_IDENT_UNDEF.scope-dot-kernel.d A test/unittest/lexer/err.D_IDENT_UNDEF.scope-dot-kernel.r A test/unittest/lexer/err.D_IDENT_UNDEF.scope-dot.d A test/unittest/lexer/err.D_IDENT_UNDEF.scope-dot.r A test/unittest/lexer/err.D_IDENT_UNDEF.scope-kernel-as-user.d A test/unittest/lexer/err.D_IDENT_UNDEF.scope-kernel-as-user.r A test/unittest/lexer/err.D_IDENT_UNDEF.scope-user-as-kernel.d A test/unittest/lexer/err.D_IDENT_UNDEF.scope-user-as-kernel.r A test/unittest/lexer/err.D_IDENT_UNDEF.scope-user-missing.d A test/unittest/lexer/err.D_IDENT_UNDEF.scope-user-missing.r A test/unittest/lexer/err.D_SYNTAX.scope-empty-bare-user.d A test/unittest/lexer/err.D_SYNTAX.scope-empty-bare-user.r A test/unittest/lexer/err.D_SYNTAX.scope-empty-bare.d A test/unittest/lexer/err.D_SYNTAX.scope-empty-bare.r A test/unittest/lexer/err.D_SYNTAX.scope-empty-dot-user.d A test/unittest/lexer/err.D_SYNTAX.scope-empty-dot-user.r A test/unittest/lexer/err.D_SYNTAX.scope-empty-user.d A test/unittest/lexer/err.D_SYNTAX.scope-empty-user.r A test/unittest/lexer/err.D_SYNTAX.scope-empty.d
A test/unittest/lexer/err.D_SYNTAX.scope-empty.r
A test/unittest/lexer/err.D_SYNTAX.scope-multiple.d A test/unittest/lexer/err.D_SYNTAX.scope-multiple.r A test/unittest/lexer/err.D_SYNTAX.scope-triple.d
A test/unittest/lexer/err.D_SYNTAX.scope-triple.r
A test/unittest/lexer/tst.scope-user-explicit.d
A test/unittest/lexer/tst.scope-user-explicit.r
A test/unittest/lexer/tst.scope-user-path-empty.r
A test/unittest/lexer/tst.scope-user-path-empty.sh M test/unittest/sizeof/err.D_IDENT_UNDEF.UnknownSymbol.d M test/unittest/sizeof/err.D_IDENT_UNDEF.UnknownSymbol.r A test/unittest/types/err.D_DECL_SCOPE.scopeop-enum-tag.d A test/unittest/types/err.D_DECL_SCOPE.scopeop-enum-tag.r A test/unittest/types/err.D_DECL_SCOPE.scopeop-enumerator.d A test/unittest/types/err.D_DECL_SCOPE.scopeop-enumerator.r A test/unittest/types/err.D_DECL_SCOPE.scopeop-ident.d A test/unittest/types/err.D_DECL_SCOPE.scopeop-ident.r A test/unittest/types/err.D_DECL_SCOPE.scopeop-member.d A test/unittest/types/err.D_DECL_SCOPE.scopeop-member.r A test/unittest/types/err.D_DECL_SCOPE.scopeop-struct-tag.d A test/unittest/types/err.D_DECL_SCOPE.scopeop-struct-tag.r A test/unittest/types/err.D_DECL_SCOPE.scopeop-union-tag.d A test/unittest/types/err.D_DECL_SCOPE.scopeop-union-tag.r A test/unittest/types/tst.scope-user-dotted.r
A test/unittest/types/tst.scope-user-dotted.sh
A test/unittest/types/tst.scope-user-types.d
A test/unittest/types/tst.scope-user-types.r

Log Message:
-----------
parser: validate scoped external names

Centralize parsing of D scoping markers used by external type and symbol references. The helper now returns the resolved scope and identifier pieces, supports kernel and userspace markers for both type and symbol lookup, and rejects empty operands, runs longer than two backticks, and repeated scoping markers as D_SYNTAX instead of falling through to lookup failures.

Recognize dotted scoped identifiers as a single lexer token so module names like foo.bar resolve as one external symbol reference.

Reject scoped type declarations.

Resolve explicitly scoped user objects.

Add lexer and type regression tests for malformed scoped identifiers, dotted scopes, empty scope operands, scope-kind mismatches, and scoping operators in declarations. Update the sizeof unknown-symbol test to use a non-empty symbol name.

Commit: f12a2faafdb1356bd7339dd2096e543d9b853bf0

      https://github.com/oracle/dtrace/commit/f12a2faafdb1356bd7339dd2096e543d9b853bf0

Author: Kris Van Hees <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)

Changed paths:
M runtest.sh

Log Message:
-----------
runtest: ignore BPF verification time differences

Commit: a56854b74f6fde002cf3aaf17f7774cb503ab8e6

      https://github.com/oracle/dtrace/commit/a56854b74f6fde002cf3aaf17f7774cb503ab8e6

Author: Kris Van Hees <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)

Changed paths:
M test/unittest/codegen/tst.kernel_read_deref_struct.d A test/unittest/codegen/tst.kernel_read_deref_struct.r.p M test/unittest/funcs/tst.subr.d
A test/unittest/funcs/tst.subr.r

Log Message:
-----------
test: improve kernel read and subroutine coverage

Commit: 0e93872ff976efb7e7da6d8062fb7eff150e9735

      https://github.com/oracle/dtrace/commit/0e93872ff976efb7e7da6d8062fb7eff150e9735

Author: Kris Van Hees <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)

Changed paths:
M test/unittest/lexer/tst.keyword-member.d A test/unittest/lexer/tst.keyword-member.r A test/unittest/lexer/tst.keyword-member.r.p A test/unittest/types/err.D_CAST_INVAL.badcast.r A test/unittest/types/err.D_DECL_SCOPE.badenum.d A test/unittest/types/err.D_DECL_SCOPE.badstruct.d M test/unittest/types/err.D_SYNTAX.badenum.d M test/unittest/types/err.D_SYNTAX.badenum.r M test/unittest/types/err.D_SYNTAX.badid.d M test/unittest/types/err.D_SYNTAX.badstruct.d M test/unittest/types/err.D_SYNTAX.badstruct.r M test/unittest/types/err.unloaded_var.r

Log Message:
-----------
test: add missing expectations and update diagnostics

Compare: https://github.com/oracle/dtrace/compare/db1c6d2a46bc...0e93872ff976

To unsubscribe from these emails, change your notification settings at https://github.com/oracle/dtrace/settings/notifications