| 1 |
#!/bin/bash |
| 2 |
//bin/true && exec stap -p2 --disable-cache $0 "$@" |
| 3 |
|
| 4 |
// The --disable-cache above is to make sure we're using different generated |
| 5 |
// @cast module for each -- so even when we have to make them, they're still |
| 6 |
// distinct. (see also semko/autocast06.stp) |
| 7 |
|
| 8 |
probe begin |
| 9 |
{ |
| 10 |
// Test multiple DWARF assignments to a local shouldn't propagate types if |
| 11 |
// they're the different underneath. The assignments themselves are ok, |
| 12 |
// but we won't have a type to deref. |
| 13 |
// (These are actually the same, but coming from different cast modules.) |
| 14 |
if (randint(2)) |
| 15 |
sun = & @cast(0, "sockaddr_un", "<sys/un.h>"); |
| 16 |
else |
| 17 |
sun = & @cast(0, "sockaddr_un", "<sys/socket.h><sys/un.h>"); |
| 18 |
println(sun->sun_family) |
| 19 |
} |
| 20 |
|