X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sK65cJM9D1+/fZZtOjRsuCGxjuLMiLjeOMEhT+5Ysbg=; b=lluHglOPT2SQQpA7/MUnhJfBpoEy7evkUOHdMT7myT6gsOUCsdGAtKiuzUznsbTCO/ dEFvh8ukeXIqUqasyXFAaBJ/Wungz7JHTEbV2eQkNfzbCxQ1WZUUposbzZzdsviA0oQV HQ/+Dwl9xXSTMgeouOmCd4Und39dHuWNUKvZCHci5MunVs9qc2fQJMjCW1PQcpj4IvgW dJWlMQ9oyWLfcy8y5Vz5N4vkahcEbeOacIhom9DnzRq4YMagJMAH1Myu6J4YzarfVhlj c1WGFIfiy8XNYM+5inO1eJ/RCjpFf/cDrRn4H/BjMgNp58iCYBqmaq8vTxVP2+kCS7fc 7n8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sK65cJM9D1+/fZZtOjRsuCGxjuLMiLjeOMEhT+5Ysbg=; b=7f8BWKAsUcyWgOWZhH1dyJTtsLXFQ3ZdN2M+OGs453jft744amADVhLStaedb0iRT6 lVxUsOFmtRKMjln9Q8a7NQRKT0iachHf91I5wXFXQo69lT+SN67Mu0oJcnP8p3xmfUtF 1XyFadg4mAhFimiJGiIix401Kw8Kc/2+YWqJdxKPlSXj9kxTmdCK42i6PEp4U7LqpHsU ntbYi1UjvdpzPSTg/n6XoRv+VTkJtzhqsdNXOCzat802Mnr61p/zwQv9rSi+ot9inxmC Zgfl8lY8Uj4oTa5sU3dwKDnME5HKxOjhrji+pwKWZIVYkwoIsp74Sldg0yKejFPuQP/E Dq/g== X-Gm-Message-State: AO0yUKUjOY3s83gVrLPHaS8b9MrR6gLZGkmFFoC8nUIHxecGkdjr3FHI QzRlndEjbOIOIQkW2gQHP9GUGUqTfQ7eKSior3gHikjS X-Google-Smtp-Source: AK7set/0nM9uavomYQHEmVHdU/gxJu3ockisx+b5zu5v7UUcejbq1588yTIwUEXd23SuIVG/V0fwFzLDeYCLvg/u4wM= X-Received: by 2002:a05:600c:a4e:b0:3e2:6f0:2543 with SMTP id c14-20020a05600c0a4e00b003e206f02543mr141258wmq.55.1676550334940; Thu, 16 Feb 2023 04:25:34 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Thu, 16 Feb 2023 15:25:34 +0300 Message-ID: Subject: Re: dxe: page fault when derefencing an exported pointer variable To: djgpp AT delorie DOT com Cc: Daniel Borca Content-Type: text/plain; charset="UTF-8" Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk >> The 'normal' vars don't seem to have a problem, but dereferencing >> that particular pointer results in a page fault: Well, I was very very wrong: I added some debug printf() statements to a simple program, so that it prints the values of certain variables exported by the library : UBYTE md_volume : 233 (0xe9) --- should have been 128 UBYTE md_musicvolume : 233 (0xe9) --- should have been 128 UBYTE md_sndfxvolume : 233 (0xe9) --- should have been 128 UBYTE md_reverb : 233 (0xe9) --- should have been 0 UBYTE md_pansep : 233 (0xe9) --- should have been 128 UWORD md_mixfreq : 44100 UWORD md_mode : 63977 (0xf9e9) --- should have been 0x110F UWORD md_device : 9705 (0x25e9) --- should have been ??? MDRIVER* md_driver : 0xcea27e9 CHAR* md_driver->Name: [crash...] Note that all of those values have 0xe9 - except for md_mixfreq to which I do assign 44100. 0xe9 (i.e.: jmp) seems to be coming from dlstatbind(): https://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/dxe/dxe3stat.c?rev=1.1 Looks like exported variables support in import libraries is very much broken?