On 2022/01/24 22:17, Jonathan Matthew wrote:
> The proposed update to lang/node makes this irrelevant, but I thought I'd send
> it anyway since it may come up elsewhere too.
> 
> I noticed that on one system, 'npm install less' would abort, logging
> 'node: backwards memcpy', but on another it worked fine.  Eventually I
> figured out this was because the working one had packages built with llvm 11,
> the other with llvm 13 packages, and llvm 13's memcpy optimiser was turning
> a series of small memcpys in node's bundled zlib into one larger one, without
> identifying that the src and dest of the larger memcpy could overlap.
> 
> Compiling the bundled zlib with -fno-builtin-memcpy prevents it from doing
> that, which fixes npm.

If we can't trust the compiler's builtin memcpy to do the right thing then
it probably needs disabling completely...

Reply via email to