dtrace-utils icon indicating copy to clipboard operation
dtrace-utils copied to clipboard

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

Open kvanhees opened this issue 3 years ago • 1 comments

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

kvanhees avatar Dec 10 '21 17:12 kvanhees

For reference: this behaves the same in BPF-based DTrace as it does with legacy DTrace. So this is actually an issue with the overall implementation of TLS variables in D.

kvanhees avatar Dec 10 '21 18:12 kvanhees