Re: Xorg segfaults on iMac G3 with Rage 128 Pro
On Tuesday, April 18, 2023, Ben Westover <kwestover.kw@gmail.com> wrote:
> Hello,
>
> On 4/16/23 10:18 PM, Paul Wise wrote:
>>
>> There is also the case where you launch Xorg via gdb and then run it.
>>
>> $ gdb `which Xorg`
>> (gdb) run
>> (gdb) bt full
>
> Perfect! I was able to get a full backtrace, which is attached. Here's
> the part that I think is important:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xa6e7cc98 in R128GetConnectorInfoFromBIOS (pScrn=pScrn@entry=0x776620, otypes=otypes@entry=0xaffff0f4) at ../../src/r128_output.c:432
> 432 ../../src/r128_output.c: No such file or directory.
> (gdb) bt full
> #0 0xa6e7cc98 in R128GetConnectorInfoFromBIOS (pScrn=pScrn@entry=0x776620, otypes=otypes@entry=0xaffff0f4) at ../../src/r128_output.c:432
> info = 0x776ed0
> bios_header = <error reading variable bios_header (Cannot access memory at address 0x48)>
> offset = <optimized out>
> i = 2
>
> Here's part of the relevant funtion in r128_output.c [1]:
>
> void R128GetConnectorInfoFromBIOS(ScrnInfoPtr pScrn, R128OutputType *otypes)
> {
> R128InfoPtr info = R128PTR(pScrn);
> uint16_t bios_header, offset;
> uint32_t i;
>
> for (i = 0; i < R128_MAX_BIOS_CONNECTOR; i++) {
> otypes[i] = OUTPUT_NONE;
> }
>
> /* non-x86 platform */
> if (!info->VBIOS) {
> otypes[0] = OUTPUT_VGA;
> }
>
> bios_header = R128_BIOS16(0x48);
almost certainly a NULL pointer from this macro
>
> There's more after this, but it seems to crash at that last line,
> failing to read the memory at 0x48 to get the BIOS' connector info.
see how 0x48 is the same there this tells us R128_BIOS16
takes a NULL address somehow.
l.
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
Reply to: