Natanael Copa on Nostr: Bumped into a weird bug today. `base64 -d something | dd bs=32 skip=96 count=1 ...
Bumped into a weird bug today.
`base64 -d something | dd bs=32 skip=96 count=1 2>/dev/null` does not always return the same data on loongarch64.
Apparently busybox dd does not guarantee that the full block is read unless `iflag=fullblock` is specified, which sort of makes sense.
Would probably not have detected this without access to real hardware.
Shows value of running CI on unusual architectures.
#Loongarch64
Published at
2025-05-28 12:29:14 UTCEvent JSON
{
"id": "95be67c8e519ab1de6ebacbf811a3151734a11257e5c6dfa0cec55698a6bf4c7",
"pubkey": "7084d8fd8979eb65dfd25c0438f410301c887b4bd3a094019f3bbdc5778e56b7",
"created_at": 1748435354,
"kind": 1,
"tags": [
[
"t",
"loongarch64"
],
[
"proxy",
"https://fosstodon.org/users/ncopa/statuses/114585459378237263",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content": "Bumped into a weird bug today.\n\n`base64 -d something | dd bs=32 skip=96 count=1 2\u003e/dev/null` does not always return the same data on loongarch64.\n\nApparently busybox dd does not guarantee that the full block is read unless `iflag=fullblock` is specified, which sort of makes sense.\n\nWould probably not have detected this without access to real hardware.\n\nShows value of running CI on unusual architectures.\n\n#Loongarch64",
"sig": "15f1cc684a80afd2ee991dc1bf55009cdf5094e8579cf73cfe73b8652d1ae79ed4b969bceae6c0e97b6bc95628ee84eb06f8a1622d2b8d8841d6c029facdda44"
}