From nobody Sat May 7 15:42:52 2022 X-Original-To: x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8CBA11AC168F for ; Sat, 7 May 2022 15:42:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KwWsm294Bz3tDd for ; Sat, 7 May 2022 15:42:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AB3D137A1 for ; Sat, 7 May 2022 15:42:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 247Fgq0W095456 for ; Sat, 7 May 2022 15:42:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 247Fgq31095455 for x11@FreeBSD.org; Sat, 7 May 2022 15:42:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: maintainer-feedback requested: [Bug 263845] graphics/libglvnd: crashes on armv7 with SIGILL Date: Sat, 07 May 2022 15:42:52 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: x11@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651938172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TiSv6kpB6EFWUmMWBkCKIaU4gn2ykxjXPu1P107c4s0=; b=xgmaqDRTZaZdFq6c754+tXRGwQDiCc1E0zIlJ7GjWGYsHY8d2WZzCuY+6D49Be8hnx63EO QPwl0yzG4qusa92AZkXXPK34YCOoyE9Hz1O6FcI1hptUNnwX/ORELojBxfpzRFRK5/E4wL fAM2bs1lqAqGjWyKuctxKMjMS7S0JSEHwBLUv7bkSFU8UPO/Kq3FgfLAfnm4d6Jj8sSoPg cC2fwxWwJyNtjopEob5OwyLUiU5afrEVzOKSjdZNOy/9tZxCXwX/+eGV5JLDl3o3H1TMny TnUfpgAW/1qADYoatadbmZM+mDAqNRj4ad4zjQ32PnfF51/OEO/TJ3pMKR/FZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651938172; a=rsa-sha256; cv=none; b=keI4urFOgEZWruMr/NO7w5xtLMPniTsUTy1Hw179UQYk1BtNXrt5WvAbmKflu2voDjxpRx sMwq6JyTfCcMOEOQMQ/d/bur5dhmlOVgDSnKuRujH6Se7MShZhcyjCNRd9QZ5poItm39Lj 3CgdR/z2bj8yZck7mzmc1cTUzw/mN+lTQaJOqLIjVi6NsS9Zb2TWLqOhbdcaboA/kMbE0i +ZMLm08Elz5+ofHnPZr/kaqaGtTR0mrBwXAGPl9SMXsKbXNPXyCjQ/Z23J0V8z1+skmVPn 8D5KVRnA+lhrIQDTSXcEyL5N000XkwWF2vAqW65glz/gi5J6Yo7fcmDVT6AbAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N Bugzilla Automation has asked freebsd-x11 (Nobody) for maintainer-feedback: Bug 263845: graphics/libglvnd: crashes on armv7 with SIGILL https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263845 --- Description --- The following simple program crashes with SIGILL when compiled on armv7 Fre= eBSD 13: #include int main() { glGetError(); } I am compiling with "cc -I/usr/local/lib -L/usr/local/include test.c -lGL. = My package version is libglvnd 1.4.0_1 and I've tested this both on native arm= v7 and in an armv7 jail running on arm64. The behaviour is extremely strange. I am aware that glvnd does some sort of dispatch logic to get to the platform's native driver, but this does not ma= tch what I see. When I try to debug this code, it seems that it is somehow iterating through the entirety of the the libGL API, only to then crash after having gone thr= ough glWriteMaskEXT. I do not understand what the purpose of this is and it does not seem to match any code I found in the library. Digging further into this, it seems that the library is compiled in ARM mod= e, but executed in Thumb mode for some reason (wtf). I suspect this might be because the source file src/GLdispatch/vnd-glapi/entry_armv7_tsd.c uses ".thumb_func" to label the stub entry points, but then they don't get compi= led in thumb mode for some reason.