tedu on Nostr: Wolf480pl so I think you've been told it's UB already, but yes. A simple mental model ...
Wolf480pl (nprofile…6yr6) so I think you've been told it's UB already, but yes.
A simple mental model is to imagine an extremely delicate cpu that crashes as soon as you load an invalid pointer into a register. The address of y is invalid when p is null, that operation will crash.
Published at
2025-02-14 19:42:53Event JSON
{
"id": "1e99c36cbea11638b990d87db7309397a1d3b813439222ba4d106357a6e84e54",
"pubkey": "4fe1f427a53df384b019e801d2aaa968c333440e25968fa45c63d04d2fd1777e",
"created_at": 1739562173,
"kind": 1,
"tags": [
[
"p",
"f3eaf89270fc0355ce2a91d69bca71c340a0a38b7c833b8ff837e8aaa0c98e82",
"wss://relay.mostr.pub"
],
[
"e",
"0f3c20d372b076be2fd183c9b3b95fbf2d6cc40d74af0da454ac65ccf44db043",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://honk.tedunangst.com/u/tedu/h/d8c4BZSgfTJ13rSKv2",
"activitypub"
]
],
"content": "nostr:nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq70403ynslsp4tn32j8tfhjn3cdq2pgut0jpnhrlcxl524gxf36pqaa6yr6 so I think you've been told it's UB already, but yes.\nA simple mental model is to imagine an extremely delicate cpu that crashes as soon as you load an invalid pointer into a register. The address of y is invalid when p is null, that operation will crash.\n",
"sig": "f0442a4f3e0a45dda8029e115c3c535c081b77a46f4ae55f60b830fb21e92a81c4db1a8e5cae223edabe2cb10e71318cb999ad1cecc14a1f844dac878eaee4ad"
}