logoalt Hacker News

LelouBilyesterday at 6:01 PM1 replyview on HN

What does the malloc or hardware do if for some reason your program needs to access memory addresses that overlap your tag bytes ?

I know that it's a really improbable scenario and the OS would also just refuse you allocations at some point, but what would the malloc implementation and the MTE do in such a case ? Fail the allocation ? trap when reading the pointer since it would point to the "wrong place" ?


Replies

wat10000yesterday at 7:21 PM

If you mean the memory that stores the actual tags associated with each 16-byte chunk of memory, that's a separate region that should be inaccessible except for using the special instructions for reading/writing tags.