I can't imagine how useless an unthinking AI would be at this when my own family and friends who, and this is important, _know me_, can't find anything to get me that doesn't land in the above categories. I wouldn't have expected gifts to be a source of AI resource waste, but I must not be very imaginative.
This is precisely the problem - an AI does not really "know" the recipient (set aside of what it means to "know" someone). The result is you get something just a bit more varied than the usual "He's a Guy - he'll love some Whiskey Stones, a Bacon-of-the-Month subscription, or a Beard Care Kit" advice. (Adjust for whatever target demographic.)
Is that an appropriate legitimate interest or do we need to split hairs?
Not printf exactly, but I've found bugs with a combination of mprotect, userfaultfd and backtrace_symbols when I couldn't use HW breakpoints.
Basically, mark a set of pages as non-writable so that any writes trigger a pagefault, then register yourself as a pagefault handler for those and see who is doing the write, apply the write and move on. You can do this with LD_PRELOAD without even recompiling the debugee.
I believe it’s the only system you know. But it’s far from the only one.
I'd love to see a list of these, with any references you can provide.