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=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=AQAFULA1jQQGFXwLgdq8d10YaNBBGfBsaJL9IZYqBDo=; b=O2HRiyKFlHRCxRGEWgiNUz9b+jH4VOu7kyzH3xFffNyi6eSVL8lB5eGqfYDy7nH56/ 6aAV+cwKSvwm1rFqDd63tSducRldPPKp1F7bEb+QNLypjcETy5HTsTpXtNJvtYffFVWx TVXfAOVfXB5TJj7vgb2ta2LY/g75NKHQwevjbMeoaP37eXEAQ45VpuMdjs/j9wtPQ6P/ PRLMZ1H8DGkFAWwc4Pxp+5JNwbNKOWrIpwP13Ndm1w5Gp8sO9gg6Nn5myJtCQIuTMpEh 3Qa3Ch4mjKTjBGZ+Qgmbl51ZIctOWgyDgJrcJDasYZmMjjXEc0LRclZAilhgUFADCHJK +WCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AQAFULA1jQQGFXwLgdq8d10YaNBBGfBsaJL9IZYqBDo=; b=07HdxL7dqQxBJ9U7lMv2t/Hk5Y2KCT0rqA51tO8nFNaRM6VHFC7QsJB7YwgBelUUM+ 0Vkq29Npk8jYw/gBTrl8tzSX1VQ3kbTTRFJOwuouxJ86OiRx4LvcZCOV7D05PkHtWQv3 GFORZTf8eTyp0kTt8uSLtB1prvBaWYuq9BfmsemakNsPHVyLnjwlsvJK3IUzy6glp18F UWvotiimJGRJdI8+4Xc1DOdWRI7zKkRWQH8MfIt4amyc997s8X6995icRBtWl7rGQpsw 9p+DIjrLrtV6ebV5T14UaVmOymS0bhHLwGnp9ykBjGRPNnsGXfYZPKUURzVD2uee2hvO iGLA== X-Gm-Message-State: AO0yUKWVwszO2ZSgdIH4r+WTmHvuZQEoYaVlDfjY6KcVez9FbP+xKJPh ryyFRHyGCCw6pR3iEux3pvqzydVQMwL4OwiEY3bH3rZY X-Google-Smtp-Source: AK7set8GqONp8w4p2dIFzrvYY0sgzxfYPtNl8KwZSjZrAewYvw7Z9umKynMmcrdD84fee87TnjH3XqJkz5zOUXSD13g= X-Received: by 2002:a05:600c:4ec6:b0:3dc:40b4:2d1f with SMTP id g6-20020a05600c4ec600b003dc40b42d1fmr21823wmq.174.1676505330668; Wed, 15 Feb 2023 15:55:30 -0800 (PST) MIME-Version: 1.0 From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Thu, 16 Feb 2023 02:55:30 +0300 Message-ID: Subject: dxe: page fault when derefencing an exported pointer variable To: djgpp AT delorie DOT com Content-Type: text/plain; charset="UTF-8" Reply-To: djgpp AT delorie DOT com dxe: page fault when derefencing an exported pointer variable The project in question is libmikmod along with its mikmod player: https://github.com/sezero/mikmod The libmikmod library exports many functions and variables, only one of those variables is a pointer: https://github.com/sezero/mikmod/blob/master/libmikmod/playercode/mdriver.c#L51 The 'normal' vars don't seem to have a problem, but dereferencing that particular pointer results in a page fault: https://github.com/sezero/mikmod/blob/master/mikmod/src/display.c#L338-L339 At time of dereferencing the pointer is not actually NULL, because if I write an accessor returning that pointer and export and use it then things work. (Yes, the library and its api are a mess, I know) Using dxe3gen from CVS -- can give instructions to reproduce / test if requested. Anyone has an insight, please?