From: Robert Klein Subject: lyx 2.4.1 crashes at startup (including patch) To: ports@openbsd.org Cc: landry@openbsd.org Date: Sun, 18 Aug 2024 20:03:52 +0200 Hi, on -current LyX crashes at startup with "Abort trap" and writes "backwards memcpy" into /var/log/messages. Exchanging memcpy in src/support/gzstream.cpp helps. (Tested with manually applying the patches from ports to downloaded source on 7.5 and newly sysupgraded snapshot.) I successfully started LyX, created a document, compiled, viewed and saved it. My patch to gzstream.cpp below. Best regards Robert --- src/support/gzstream.cpp.orig Sun Aug 18 18:41:04 2024 +++ src/support/gzstream.cpp Sun Aug 18 18:41:28 2024 @@ -32,7 +32,7 @@ #include #ifdef HAVE_STRING_H -# include // for memcpy +# include // for memmove #endif using namespace std; @@ -92,7 +92,7 @@ int n_putback = gptr() - eback(); if ( n_putback > 4) n_putback = 4; - memcpy( buffer + (4 - n_putback), gptr() - n_putback, n_putback); + memmove( buffer + (4 - n_putback), gptr() - n_putback, n_putback); int num = gzread( file, buffer+4, bufferSize-4); if (num <= 0) // ERROR or EOF