delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2023/09/12/01:00:10

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Received: by 2002:a05:622a:1999:b0:40f:e2a5:3100 with SMTP id u25-20020a05622a199900b0040fe2a53100mr38791qtc.6.1694494052591;
Mon, 11 Sep 2023 21:47:32 -0700 (PDT)
X-Received: by 2002:a17:903:22cc:b0:1c3:1ceb:97b6 with SMTP id
y12-20020a17090322cc00b001c31ceb97b6mr4528040plg.7.1694494052135; Mon, 11 Sep
2023 21:47:32 -0700 (PDT)
Newsgroups: comp.os.msdos.djgpp
Date: Mon, 11 Sep 2023 21:47:31 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=89.176.63.76; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp
NNTP-Posting-Host: 89.176.63.76
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6ebec8b4-2dd0-4e7c-92ed-2a72b8e0ad44n@googlegroups.com>
Subject: memalign has problem with _align > 8 - cause crash in OpenJPEG library
From: "RayeR (rayer314 AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Injection-Date: Tue, 12 Sep 2023 04:47:32 +0000
Bytes: 1633
Lines: 7
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 38C502Vc005254
Reply-To: djgpp AT delorie DOT com

Hi, I don't know if it's known bug or limitation, but i found this problem during compilation of OpenJPEG 1.5.0 library where demo programs crashed. After some fiddling I found that problem is in memalign() from current libc that OpenJPEG used with align argument of value 16. When I lower the align to 8 it worked then without crashing. I decided to use _mm_malloc() insteasd that works with align of value 16 OK.
It may cause problems with other code that use memalign() so can someone patch the code in libc?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019