@whitequark@mastodon.social
@whitequark@mastodon.social avatar

whitequark

@whitequark@mastodon.social

catgirl shaped object

"A cat is valued for companionship and its ability to kill vermin."

✧ i have friends, and my purpose is to support them ✧
✦ i have enemies, and my purpose is to eliminate them ✦
✶ i have a life, and my purpose is to reach heaven by violence ✶
✷ nothing else matters ✷

#searchable

This profile is from a federated server and may be incomplete. Browse more on the original instance.

azonenberg, to random
@azonenberg@ioc.exchange avatar

Not sure if this is a gcc bug or some weird corner of UB or what...

But I have a packed struct containing a uint32 as the first field. I'm running on ARMv7-M so 32-bit unaligned loads are allowed (but not 64-bit).

This struct is being read directly via casting from a network RX buffer that is likely not aligned to any particular byte boundary. It's a) packed and b) has 32-bit fields in it.

So silly me assumed that gcc would generate either bytewise reads (assuming no alignment at all) or a ldr instruction (accepting that 32-bit unaligned loads are OK).

But for some reason at -O3 it generates a 64-bit read with ldrd, which promptly hard faults. I have no idea why it's doing that given that I was just __builtin_bswap32'ing a single 32-bit field.

Was able to work around the issue with memcpy, but seriously WTF? If I'm using a packed struct I'm explicitly telling the compiler not to make any assumptions about alignment because I'm directly serializing the data from somewhere. Where did it magically get the idea that my packed 32-bit field had 64-bit alignment?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg [incorrect info removed]

whitequark,
@whitequark@mastodon.social avatar

@azonenberg [incorrect info removed]

whitequark,
@whitequark@mastodon.social avatar

@azonenberg [incorrect info removed]

whitequark,
@whitequark@mastodon.social avatar

@azonenberg can you show me the struct definition?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg ok that... actually sounds like a bug

whitequark,
@whitequark@mastodon.social avatar

@azonenberg yeah ok I was wrong; __attribute__((packed)) implies alignment of 1

that's really weird

whitequark,
@whitequark@mastodon.social avatar

@azonenberg which -march?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg can't reproduce on 12.2.0, interestingly https://gcc.godbolt.org/z/Pxzdfq41M

whitequark, to random
@whitequark@mastodon.social avatar

i'm sorry... why does my laptop include a schematic sheet for smokeless powder?

whitequark,
@whitequark@mastodon.social avatar

what on earth does this even do? does it... crowbar the AC IN to ground??

whitequark,
@whitequark@mastodon.social avatar

oh wait no, it's some intel nonsense

whitequark, to random
@whitequark@mastodon.social avatar

where in the UK would i have a type-C connector on a laptop motherboard swapped?

I need it to be done within 1-2 days

whitequark,
@whitequark@mastodon.social avatar

@6a62 100 GBP to swap a fucking USB connector?????

for 100 GBP I will do it myself

whitequark,
@whitequark@mastodon.social avatar

unhappy catgirl noises

whitequark,
@whitequark@mastodon.social avatar

to me "repair" means "borrowing the equipment and manual skills of a qualified craftsman in order to perform something i do not have the equipment and manual skills to do myself"

i am starting to suspect most people have a different understanding of what "repair" means

whitequark,
@whitequark@mastodon.social avatar

@farcaller "someone charging you to figure out what the problem is and ordering parts while your device sits there for half of a fucking month"

whitequark,
@whitequark@mastodon.social avatar

@promovicz they most certainly do not provide NBD repairs...

whitequark,
@whitequark@mastodon.social avatar

@anymouse_404 @farcaller hisses at this nonsense

whitequark,
@whitequark@mastodon.social avatar

@G_glop @6a62 that is absolutely Not the way to do it; i do not want bismuth or indium based solder anywhere near my laptop and especially not close to the parts that heat

whitequark,
@whitequark@mastodon.social avatar

@G_glop @6a62

  • it softens way earlier than the normal one. this can result in a thermal runaway for a connector
  • it forms weird and bad intermetallics and you can never fully get it off the PCB, ever
astrid, to random
@astrid@fedi.astrid.tech avatar

how's it goin my nyoomfies and awoomfies

whitequark,
@whitequark@mastodon.social avatar

@astrid good. i love thermal imaging

whitequark, to random
@whitequark@mastodon.social avatar

VIS / LWIR

so pretty

image/jpeg

whitequark,
@whitequark@mastodon.social avatar

@mcc I do not actually have UV imaging capability

amy, to random
@amy@spookygirl.boo avatar

Pull requests are bad because they prioritize the sender rather than the project. It makes sense this would be the case because sender priority is part of how companies juice engagement numbers.

That is, when you make senders happy they will send more which makes numbers go up. You see this with messaging apps and read receipts too.

whitequark,
@whitequark@mastodon.social avatar

@amy I see. I... hm, that's unexpectedly sympathetic.

whitequark,
@whitequark@mastodon.social avatar

@amy I feel like low friction is important, but it's more important on things that enable long-term maintenance than drive-by PRs, and I think you're right in that GH's PRs for example privilege the latter

whitequark, to random
@whitequark@mastodon.social avatar

this is how i control heating in this place now

whitequark,
@whitequark@mastodon.social avatar

@cks oof yea i hit most of these issues.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines