[Bug 267606] x11-drivers/xf86-video-nv: Segmentation Fault post update from 1.20.14,1 to 21.1.4

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 19 Feb 2024 21:52:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267606

--- Comment #52 from Sergiy <Black_N@ukr.net> ---
(In reply to Yusuf Khan from comment #51)
Ok, I have some result.
I followed the path of inspecting the source code of the hw directory changes:
xorg-server-1.20.14 (which worked)
xorg-server-21.1.4 (stopped working)
xorg-server-21.1.11 (installed now)
Xenocara (OpenBSD worked).
I will not describe in detail, the process itself...

And the differences made by the OpenBSD developers in the file
hw/xfree86/modes/xf86Modes.c helped me:

--- 2024_xorg-server-21.1.11/xorg-server-21.1.11/hw/xfree86/modes/xf86Modes.c  
2024-01-16 11:59:07.000000000 +0200
+++ 2024_Xenocara_xserver/hw/xfree86/modes/xf86Modes.c  2024-01-31
15:22:06.000000000 +0200
@@ -803,10 +803,14 @@
 {
     struct libxcvt_mode_info *libxcvt_mode_info;
     DisplayModeRec *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
+    char *tmp;

     libxcvt_mode_info =
         libxcvt_gen_mode_info(HDisplay, VDisplay, VRefresh, Reduced,
Interlaced);

+    XNFasprintf(&tmp, "%dx%d", HDisplay, VDisplay);
+    Mode->name = tmp;
+    
     Mode->VDisplay   = libxcvt_mode_info->vdisplay;
     Mode->HDisplay   = libxcvt_mode_info->hdisplay;
     Mode->Clock      = libxcvt_mode_info->dot_clock;

I modified this file in the xorg-server-21.1.11 source code (or rather borrowed
it from Xenocara), created the xorg-server-21.1.11.tar.xz archive and
downloaded it to /usr/ports/distfiles/ on my laptop.

In the xorg-server directory of the port tree, made changes to the distinfo
file according to the received archive (changed): SHA256.., SIZE...
and: 
# make install 
...
# make clean

(Having first removed the installed xorg-server.)

As a result, when I enter startx, I get TWM on the laptop screen with a native
extension of 1280x800.

This worked for me.

I will try to create a suitable package to replace xorg-server on a different,
non-test disk.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.