oracle / oracle/dtrace

TLS variables (self->x) can be declared with an array datatype but cannot be used as such

Open
#61 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
189
Forks
23
PR merge metrics
No merged PRs in 30d

Description

dtrace -s /dev/stdin << EOT

self int n[1];
BEGIN { self->n[0] = 1; }
EOT

dtrace: script '/dev/stdin' matched 1 probe
dtrace: error on enabled probe ID 1 (ID 1: dtrace:::BEGIN): invalid address (0x0) in action #1 at DIF offset 24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the supplied DTrace script from the issue and confirm that declaring self->n as an array succeeds but assigning self->n[0] fails with an invalid address. Trace the TLS array declaration and indexed access handling in the DTrace implementation. Done means the example executes successfully without the invalid-address error.

Written by the indexing model from the issue text.

Assessment

Domain
observability-sre, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.