delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2018/11/21/07:33:34

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=VpIre+uRyjfSdhm3+pt7ekvxXzQqxJUL2AtBE2+6L5g=;
b=MbcYFStJ2OoX6AtkY4p+J2Thq/zgIo4FAL+eoFixvsXsi7r0d6Vd6FgtpqjlBAGIms
gkrD1LCMSnHwhq5f4J5GxiOm32pHLCWESpl1hY+NiTBe5YMxMi488LrK4MneCQKR9BlZ
m4Rd6xxQ3mOn4LPFfnfuzXYI6qw2H9YQCtSsrzjrQnPfZswvBDvAX5kRO47JuNrcofOQ
bQnJG+8GCz+oYr9Ryo60ROQAW0SXwHBVSQzH8lkfEQZ84r5EIZVDahTgcWDSbxbg+NVY
hwQZqYiG4hU94gfmrjoNCpiadN9Spcvq41G5vwJOwt0eVfIfTfzf97FUmscF/ocQkkOG
8TYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to;
bh=VpIre+uRyjfSdhm3+pt7ekvxXzQqxJUL2AtBE2+6L5g=;
b=XoWR+KfXr2uvuXIBxdXfNhIL+v3q0RDyf8v0A/zwDw6AVMds5qsz/DtwYYI0gfEBb4
gJJDIBL4+KByA81O5uEigoYD2qa9WHxvI/sV4/QngEJthPjiFKukB79mGg07RVxFPYaP
acW2N46Ek63cAVNzjLnSNZKWcuyo0zstmKXQH25yg7/PlCfmN7LHQ7hOIZVz5TzVwZj/
JKL69f2FKdkJ/EOWNuSGEHC/g7ktlEeB6rrxEKQK/ZZfbCb7LkmjUVnebXfzu7KO0o1i
e6mw5yL8hqsZLtt+W5QkM0rWbMQwXWZHxttTtOX72s7yjXZkdffBCSrnUWHup1XyUXDL
NpIg==
X-Gm-Message-State: AGRZ1gIOLL2Nr0zllRKndvMTyN3HxG4EsSL9mBgQIuFT5LkvfdSJHuEb
fcd6OdOQekZzyAv9q9hkA3lHIK+5jDVq+S0soIfurA==
X-Google-Smtp-Source: AFSGD/Vb290pnHl3dJUKOZJWabKmZ47NdunH1y0YCy9XnI89AsgcRbNjwLzL8fTPbLN/nsi6zB4bdJ/rwXjBqRIMqMU=
X-Received: by 2002:a24:edc4:: with SMTP id r187mr6105264ith.158.1542803611532;
Wed, 21 Nov 2018 04:33:31 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <20181121121721.GA1501@b21e7fa156c1e52f6cc3a9e0ddf22975>
References: <20181121121721 DOT GA1501 AT b21e7fa156c1e52f6cc3a9e0ddf22975>
From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp-workers AT delorie DOT com]" <djgpp-workers AT delorie DOT com>
Date: Wed, 21 Nov 2018 15:33:31 +0300
Message-ID: <CAA2C=vC30DQkZ95EESRDMVVXfML_741-V=zKCHtfRXfYM1tXgQ@mail.gmail.com>
Subject: Re: memalign broken (again)
To: djgpp-workers AT delorie DOT com
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 11/21/18, Peter Ross <pross AT xvid DOT org> wrote:
> hi,
>
> djgpp memalign still fails when:
>
> 	1. alignment is >= 16 bytes
> 	2. some sequence of memory allocations have already occured.
>
> the test case below is reproducible with djgpp cvs and 2.05+nmemalign.patch
> (patch was found here:
> https://aur.archlinux.org/cgit/aur.git/tree/nmemalign.patch?h=dosbox-djcrx)
>
> tested using freedos 1.2 on physical hardware.
>
> ---
> #include <stdio.h>
> #include <malloc.h>
>
> #define TEST(alignment, size) \
>         printf("memalign(%d,%d)=", alignment, size); \
>         ptr = memalign(alignment, size); \
>         printf("%p\n", ptr);
>
> int main()
> {
>     void * ptr;
>     TEST(1, 46)
>     TEST(4, 583)
>     TEST(64, 773)
>     TEST(32, 889)  /* <-- reliably fails here */
>     return 0;
> }

Did a quick build & run, reproduces under dosemu and dosbox, too.

memalign(1,46)=99010
memalign(4,583)=99060
memalign(64,773)=99300
memalign(32,889)=realloc: memory fouled
Exiting due to signal SIGABRT
Raised at eip=00005bec
eax=00094ba0 ebx=00000120 ecx=00000000 edx=00000000 esi=00000379 edi=00099618
ebp=00094c58 esp=00094b90 program=C:\A.EXE
cs: sel=00cf  base=01127000  limit=0009ffff
ds: sel=00d7  base=01127000  limit=0009ffff
es: sel=00d7  base=01127000  limit=0009ffff
fs: sel=00b7  base=00002a90  limit=0000ffff
gs: sel=00e7  base=00000000  limit=0010ffff
ss: sel=00d7  base=01127000  limit=0009ffff
App stack: [00094da8..00014dac]  Exceptn stack: [00014cf8..00012db8]

Call frame traceback EIPs:
  0x00005b3b
  0x00005bec
  0x00006c58
  0x000063b3
  0x0000203e
  0x00003674

--
O.S.

- Raw text -


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