On 6/1/20 7:58 PM, Ángel wrote: > On 2020-06-01 at 15:12 -0400, Chet Ramey wrote: >> I finally found a case where 16-byte alignment for memory returned by >> malloc() is required. But it's only on Linux systems that use systemd. >> I bet it's trying to marshal arguments for IPC and uses instructions >> that require 16-byte alignment. >> >> Thanks for your help verifying this. >> >> Chet > > You mean that with systemd getpwnam() crashes if using a malloc() that > returns addresses not 16-byte aligned?
Yes, that's what I mean. The only significant change between the bash version that worked and the one(s) that did not is making the memory the bash malloc returns 16-byte aligned. Other systems not using glibc or systemd could not reproduce the issue. > Cornercase, surely, but it seems like a bug in whatever is assuming such > alignment. That's not even pointer-size alignment. If systemd or its support libraries are using copy instructions that require 16-byte alignment, though it's not documented, it's arguably not a bug. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/