(memset is also good, but it lacks panache, and it doesn't work if either null pointers or 0.0 are not represented with all bits zero)
-
Show this thread
-
-
Replying to @jckarter
Surely memset does not write to the struct but the the array of characters that represents the struct. So memset is not doing anything illegal. The padding values are guaranteed to be lost with memset, but you could hardly depend on them anyway when not using memset.
1 reply 0 retweets 0 likes -
Replying to @rep_stosq_void
Yeah memsetting padding bytes isn’t illegal, but like you said those zero bytes will get lost if any kind of store forwarding optimization happens. I’ve seen code bitten by assuming memset guarantees zero padding bytes a few times
1 reply 0 retweets 3 likes -
Replying to @jfbastien @ohunt
We had a bunch of fun bugs in Swift on Ubuntu 14.04 because older glibc had padding bytes in significant parts of struct sockaddr
1 reply 1 retweet 4 likes -
You want to talk about fun structure padding issues, wait until you try writing Xlib bindings ;)
1 reply 0 retweets 2 likes -
I would’ve hoped all the cool kids would use xcb by now
1 reply 0 retweets 0 likes -
GLX doesn’t work on XCB (as of when I was writing this code a few years ago)
1 reply 0 retweets 0 likes -
Still?!
1 reply 0 retweets 0 likes
Looks like it :( https://stackoverflow.com/posts/50086463/revisions …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.